fork download
  1. #include <memory>
  2.  
  3. struct Foo
  4. {
  5. std::auto_ptr<int> a;
  6. };
  7.  
  8. int main()
  9. {
  10. throw Foo();
  11. }
  12.  
Compilation error #stdin compilation error #stdout 0s 3012KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:10:15: error: no matching function for call to 'Foo::Foo(Foo)'
prog.cpp:4:1: note: candidates are: Foo::Foo()
prog.cpp:4:1: note:                 Foo::Foo(Foo&)
prog.cpp:10:15: error:   in thrown expression
stdout
Standard output is empty