I guess it is so, but I am looking for C++11 language lawyers to confirm my impression. Is it true that the following class
struct X{
X(){}
X(X const&)=default;
};
will not be automatically move-enabled, i.e., getting X(X&&)
and operator=(X&&)
, because its copy constructor is "user-declared", even though it looks equivalent to
struct X{
};
which will get both X(X const&)
and X(X&&)
etc., implicitely declared and (trivially) defined on use.