Is the following snipplet correct for un-defining all otherwise generated methods and constructors for a class?
struct Picture {
// \'explicit\': no accidenta
Seems fine to me. The return value of operator=
must be a normal reference, even if the object is constructed from a rvalue reference. That is because you can't just compile an lvalue (*this
) to an rvalue.
And it should take that rvalue reference per non-const Picture& operator=(Picture&&)
. How would you move from a constant object? ;)