By closing the copy constructor, you will help prevent objects from being accidentally split when you make a copy of a derived class, but lose all the properties of that derived class. The resulting classes can create their own copy constructors, which are public and do the right thing.
In one case, when the copy constructor should be protected instead of the private one, when the abstract class has data members. This happens infrequently. A base class can copy elements of a base class, and a derived class copies its own members.
class AbstractBase { public: AbstractBase(const std::string &init) : wtf(init) {} virtual ~AbstractBase() {} void DoSomething() = 0; protected: AbstractBase(const AbstractBase &r) : wtf(r.wtf) {} const std::string wtf; }; class Derived : public AbstractBase { public:
source share