Defaulted Constructors, Destructor, and Operators (=default) 1/3
When the compiler-generated constructors, destructors, and operators are useful:
• Change the visibility of non-user provided constructors and assignment operators
( public , protected , private )
• Make visible the declarations of such members
The defaulted default constructor has a
::::::
similar effect as a user-defined constructor
with empty body and empty initializer list
When the compiler-generated constructor is useful:
• Any user-provided constructor disables implicitly-generated default constructor
• Force the default values for the class data members
49/66