1 #include <iostream> 2 #include <cstdlib> 3 4 void foo()5foo() 6 { 7 } 8 9 template<typename C> 10 void bar(C *)11bar(C*) 12 { 13 } 14 15 template 16 void 17 bar<int>(int*); 18 19 int main()20main() 21 { 22 try 23 { 24 throw(1); 25 } 26 catch(int) 27 { 28 std::cout << "caught" << std::endl; 29 exit(0); 30 } 31 std::cout << "failed" << std::endl; 32 exit(1); 33 } 34