When reading TCPL, I had a problem, as indicated in the title, and then the class 'private':
class Unique_handle {
private:
Unique_handle& operator=(const Unique_handle &rhs);
Unique_handle(const Unique_handle &rhs);
public:
};
code used:
struct Y {
Unique_handle obj;
};
and I want to perform the following operations:
int main()
{
Y y1;
Y y2 = y1;
}
although this code comes from TCPL, but I still can’t get a solution ... Someone can help me, please rate.
source
share