To prevent copying a class, you can very easily declare a private copy constructor / assignment operators. But you can also inherit boost::noncopyable
.
What are the advantages / disadvantages of using boost in this case?
Summarizing what others have said:
Advantages of boost::noncopyable
over private copy methods:
noncopyable
.Advantages of private copy methods over boost::noncopyable
: