Advertisement
Guest User

Untitled

a guest
Jul 24th, 2019
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. class Foo
  2. {
  3. public:    
  4.     Foo(const std::string& arg) try : m(arg, 100)
  5.     {
  6.         std::cout << "constructed";
  7.     }
  8.     catch(const std::exception& e)
  9.     {
  10.         std::cout << "failed";
  11.     }
  12.    
  13. private:
  14.     std::string m;
  15. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement