Catch block in constructor without try
问题 I have the following code: #include <iostream> using namespace std; int foo() { throw 1; } struct A { int a; public: A() try : a(foo()) { cout << "Constructor A\n"; } catch(...) { cout << "Catched in A\n"; } }; struct B : A { B() { cout << "Constructor B\n"; ::foo(); } catch(...) { cout << "Catched in B\n"; } void foo() { } catch(...) { cout << "Catched in foo\n"; } }; int main () try { B b; return 0; } catch (...) { cout << "Catched in main\n"; } It outputs: Catched in A Catched in main Why