diff options
Diffstat (limited to 'libcxx/test/language.support/support.exception')
-rw-r--r-- | libcxx/test/language.support/support.exception/uncaught/uncaught_exception.pass.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libcxx/test/language.support/support.exception/uncaught/uncaught_exception.pass.cpp b/libcxx/test/language.support/support.exception/uncaught/uncaught_exception.pass.cpp index 71c16549fad..4aa01c2c176 100644 --- a/libcxx/test/language.support/support.exception/uncaught/uncaught_exception.pass.cpp +++ b/libcxx/test/language.support/support.exception/uncaught/uncaught_exception.pass.cpp @@ -20,13 +20,22 @@ struct A } }; +struct B +{ + B() + { + // http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#475 + assert(!std::uncaught_exception()); + } +}; + int main() { try { A a; assert(!std::uncaught_exception()); - throw 1; + throw B(); } catch (...) { |