dimanche 2 août 2015

In C++11, can I use override specifier on an explicitly defaulted destructor?

And if so, what would be the syntax?

This does not compile with g++ -std=c++0x:

class B {
public: 
    virtual ~B() {} 
}; 

class A : public B {
public: 
    ~A() = default override; 
}; 

Aucun commentaire:

Enregistrer un commentaire