#include<exception> struct E : std::exception { ~E() {} // wrong syntax // ~E() throw() {} // <--- correct syntax }; int main () { E e; }
Standard input is empty
prog.cpp:4:5: error: looser throw specifier for ‘virtual E::~E()’ In file included from prog.cpp:1:0: /usr/include/c++/4.7/exception:66:13: error: overriding ‘virtual std::exception::~exception() throw ()’
Standard output is empty