I've stumbled upon 2 stupid questions during my C++ practixe :
AFAIK in c++ copy constructor and assignment operators are not inherited...so how does boost::noncopyable help in this case to prohibit this stuff?
class X: private boost::noncopyable { };Is it necessary to use only private inheritance to achieve the goal?Is there only 1 way to declare assignment operator
MyClass& operator= ( const MyClass & );
Is it the same thing to declarevoid operator= ( const MyClass & );
orconst MyClass& operator= ( const MyClass & );
?
boost::noncopyable const& x = X{};- Praetorian