Is it possible to declare a destructor as pure virtual and use the default keyword? For example, I can't seem to make code like this work:
class MyClass
{
public:
// Is there a way to combine pure virtual and default?
virtual ~ MyClass() = 0,default;
};
One can of course later do:
MyClass::~ MyClass() = default;
Also, if the destructor is not pure virtual, the default keyword does work when it follows the declaration.
Aucun commentaire:
Enregistrer un commentaire