trompeloeil icon indicating copy to clipboard operation
trompeloeil copied to clipboard

``trompeloeil_movable_mock`` only provides move-ctor

Open DNKpp opened this issue 10 months ago • 3 comments

Trompeloeil's mocks should be movable, when the bool member trompeloeil_movable_mock is set to true. But currently it is limited to move-construction; move-assignment is not supported. Is there a reason for this? Or is it just a bug? A simple fix would be just the line: expectations& operator =(expectations&&) = default; in the struct expectations definition.

Btw, as a side-note: it's never a good idea to explicitly specify noexcept on defaulted functions, as this is can and will be overriden by compilers. => expectations(expectations&&) noexcept = default;

DNKpp avatar Apr 10 '24 20:04 DNKpp