code_junkie

Can you really have a function/method without a body but just a try/catch block?

Nov 12th, 2011
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. void func( void )
  2. try
  3. {
  4. ...
  5. }
  6. catch(...)
  7. {
  8. ...
  9. }
  10.  
  11. struct f {
  12. g member;
  13. f() try {
  14. // empty
  15. } catch(...) {
  16. std::cerr << "thrown from constructor of g";
  17. }
  18. };
Add Comment
Please, Sign In to add comment