summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/language.support/support.exception
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/language.support/support.exception')
-rw-r--r--libcxx/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/libcxx/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp b/libcxx/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp
index 887264a5c6f..dad0df24807 100644
--- a/libcxx/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp
+++ b/libcxx/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp
@@ -36,6 +36,10 @@ public:
friend bool operator==(const B& x, const B& y) {return x.data_ == y.data_;}
};
+#if __cplusplus > 201103L
+struct Final final {};
+#endif
+
int main()
{
{
@@ -100,4 +104,16 @@ int main()
assert(i == 7);
}
}
+#if __cplusplus > 201103L
+ {
+ try
+ {
+ std::throw_with_nested(Final());
+ assert(false);
+ }
+ catch (const Final &f)
+ {
+ }
+ }
+#endif
}
OpenPOWER on IntegriCloud