1 // DISABLED: win32 win64 2 /* 3 TEST_OUTPUT: 4 --- 5 fail_compilation/cppeh1.d(26): Error: cannot catch C++ class objects in @safe code 6 --- 7 */ 8 9 version (Windows) static assert(0, "This test should not run on this platform"); 10 11 extern (C++, std) 12 { 13 class exception { } 14 } 15 16 @safe: 17 void bar(); 18 void abc(); 19 foo()20void foo() 21 { 22 try 23 { 24 bar(); 25 } 26 catch (std.exception e) 27 { 28 abc(); 29 } 30 } 31