Код: Выделить всё
class Foo {
public:
Foo(const Foo&) = delete;
Foo& operator=(const Foo&) = delete;
Foo() = delete;
};
std::unique_ptr CreateFoo() {
return std::unique_ptr();
}
int main(int argc, char** argv) {
std::unique_ptr result = CreateFoo();
return 0;
}
Подробнее здесь: https://stackoverflow.com/questions/794 ... onstructor