void func1() { try { } catch (...) {} } void func2() try { } catch (...) { }
The second one is called a function try/catch block. Here is an example in a constructor:
MyClass::MyClass() try : d_mem1(0), d_mem2 { } catch (...) { }
References:
Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library
C++ Templates
http://www.gotw.ca
No comments:
Post a Comment