How to use a object whose copy constructor and copy assignment is private?
- by coanor
In reading TCPL, I got a problem, as the title refered, and then 'private' class is:
class Unique_handle {
private:
Unique_handle& operator=(const Unique_handle &rhs);
Unique_handle(const Unique_handle &rhs);
public:
//...
};
the using code is:
struct Y {
//...
Unique_handle obj;
};
and I want to execute such…