--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Its not the fault of the implementations: The rules had been
changed slightly rather recently. According to the most recent
draft a user-declared move-constructor (assignment operator)
prevents an implicitly declared copy-constructor (assignment
operator) and vice versa. Note that an explicitly defaulted
or deleted special member function is also a user-declaration,
e.g.:
struct X {
X(const X&) = default; // No implicitly declared move-
// constructor
X& operator=(const X&) = delete; // No implicitly declared
// move-assignment operator
};
HTH & Greetings from Bremen,
Daniel Krügler
Yes.
> I kind of expected the other ctor
> to be suppressed by providing the user defined copy/move ctor.
I don't see any reasoning why that should be the case.
Objects are copyable by default, irrelevant to whether you special-
case the rvalue case or not.
If you want to disable the lvalue case, delete the overload.
Please ignore, this, I wasn't aware this had been changed.