The following seems to compile on a couple of compilers that I've tried:
class A
{
public:
virtual void foo() throw() = 0;
};
class B : public A
{
public:
virtual void foo() noexcept override { }
};
It seems that one can override a throw() function with the newer noexcept specification. Why is that? Is this undefined behavior or is this allowed?
Aucun commentaire:
Enregistrer un commentaire