3 ms·
I'm not sure what you mean. If you have code like this struct Foo { unique_ptr p; }; Foo is automatically not copyable. That code is about is
by pingyong 7y ago
I'm not sure what you mean. If you have code like this
struct Foo {
unique_ptr p;
};
Foo is automatically not copyable. That code is about is perfectly good idiomatic C++, with zero boilerplate. And that is how most classes actually end up looking in idiomatic C++, there's almost never the need to implement operators.