fork(1) download
  1. #include<exception>
  2.  
  3. struct E : std::exception {
  4. ~E() {} // wrong syntax
  5. // ~E() throw() {} // <--- correct syntax
  6. };
  7.  
  8. int main () {
  9. E e;
  10. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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 ()’
stdout
Standard output is empty