Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Parm parm_;
- Parm &parm_;
- const Param ¶m_;
- int foo();
- int& i = foo();
- void my_exit(const std::string & msg)
- {
- std::cout << "my_exit: " << msg << std::endl;
- }
- void test()
- {
- std::string msg("test_1 Hello World");
- ON_BLOCK_EXIT(&my_exit, msg.substr(0, 6));
- }
- void test()
- {
- std::map<int, std::string> m;
- m[42] = "test_2";
- ON_BLOCK_EXIT(my_exit, m[42]);
- m.clear();
- }
- void test(const std::string & msg)
- {
- ON_BLOCK_EXIT(&my_exit, msg);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement