C++1x-2x Special Member Func Ons: Compiler Implicitly Declares
C++1x-2x Special Member Func Ons: Compiler Implicitly Declares
C++1x-2x Special Member Func Ons: Compiler Implicitly Declares
C++98
Default constructor User declared Defaulted Defaulted Defaulted Defaulted Defaulted
user declares
Destructor Defaulted User declared Defaulted Defaulted Not declared Not declared
Copy constructor Not declared Defaulted User declared Defaulted Not declared Not declared
Copy assignment Defaulted Defaulted Defaulted User declared Not declared Not declared
Move constructor Not declared Defaulted Deleted Deleted User declared Not declared
Move assignment Defaulted Defaulted Deleted Deleted Not declared User declared
C++98
Move only classes
Deprecated
after C++11
The behaviour of the compiler supplying those is deprecated (but not in pre C++11)
Rule of three: if a class defines any of the destructor, copy constructor or copy assignment operator then it should probably explicitly define all three
Deleted Although deleted, they s ll exist, so they can par cipate in overload resolu on