There is an obscure pitfall of making a class noncopyable by making the copy constructor private.
Consider the following class:
class X {
private:
X& (const X&); // not defined
public:
X bar() {
X x = ......;
return x;
}
};
Due to programmer error, an instance of X is returned by value despite the class being noncopyable. The copy constructor being private doesn't help as bar() is a method of X. This will compile and link, despite the copy constructor being undefined. I will leave the reason for this as an exercise for the reader.