Consider a simple C ++ class that I don't want to change:
class foo {};
Then, if I do the following, I will call the move assignment operator:
foo f{};
f = foo{};
Is there a way to invoke the assignment of a copy without modification fooor using an intermediate of the gfollowing form:
foo f{};
foo g{};
f = g;
Almost as if it were std::dont_move!
keith source
share