Looking at this question it mentions C++11 and later only:
The move constructor is auto-generated if there is no user-declared copy constructor, copy assignment operator or destructor, and if the generated move constructor is valid (e.g. if it wouldn't need to assign constant members) (§12.8/10).
So if I have the following code:
class Y
{
public:
Y(const Y&) {}
};
struct hasY {
hasY() = default;
hasY(hasY&&) = default;
Y mem;
};
hasY hy, hy2 = std::move(hy); //this line fails as expected as Y has a user-defined copy constructor.
Now if I add the default constructor to Y:
Y() {}
The error goes away.
Where does it say that the default constructor causes the creation of the move constructor?
(using VS 2015 update 2)