compiler generated constructors [duplicate]
This question already has an answer here: Conditions for automatic generation of default/copy/move ctor and copy/move assignment operator? 3 answers This is just a quick question to understand correctly what happens when you create a class with a constructor like this: class A { public: A() {} }; I know that no default constructor is generated since it is already defined but are copy and assignment constructors generated by the compiler or in other words do i need to declare a private copy constructor and a private assignment operator in order to prevent this from happening? class A { private: