Imagine a class which can be constructed only with the new
operator. Is it possible to achieve this in the c++17 standard without deleting its destructor?
class Foo
{
Foo(){}
~Foo(){}
// delete non-dynamic constructor...?
}
// ...
Foo A; // compiling error
Foo* B = new Foo(); // ok