First, if you want your class to not be completely copied, do not run the private copy constructor and assignment operator. Otherwise, it is still possible that a piece of code that has access (method or friend) can quietly make copies. Without implementation, you will get a linker error.
However, a compiler error is preferable because you will find out about the error faster. There is boost::noncopyable , or you can get a base class that hides its constructor and assignment operator.
Regarding the default constructor: the compiler will not generate it if you declare any constructor at all. Usually there is no need to hide it.
source share