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/rethrow_if_nested.pass.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp b/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp
index 9a44a4ec291..a8b6e15feab 100644
--- a/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp
+++ b/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp
@@ -37,6 +37,13 @@ public:
B(const B& b) : A(b) {}
};
+class C
+{
+public:
+ virtual ~C() {}
+ C * operator&() const { assert(false); } // should not be called
+};
+
int main()
{
{
@@ -79,7 +86,7 @@ int main()
{
try
{
- std::rethrow_if_nested(1);
+ std::rethrow_if_nested(C());
assert(true);
}
catch (...)
@@ -87,4 +94,5 @@ int main()
assert(false);
}
}
+
}
OpenPOWER on IntegriCloud