diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:47:26 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:47:26 +0000 |
commit | 51072bd6bf79ef2bc6a922079bff57c31c1effbc (patch) | |
tree | 91a2effbc9e6f80bdbbf9eb70e06c51ad0867ea0 /test/std/language.support/support.exception/except.nested | |
parent | bb5e33f003797b67974a8893f7f2930fc51b8210 (diff) |
Notes
Diffstat (limited to 'test/std/language.support/support.exception/except.nested')
-rw-r--r-- | test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp | 4 | ||||
-rw-r--r-- | test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp b/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp index a8b6e15feab8..4ee95fdf3001 100644 --- a/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp +++ b/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp @@ -76,9 +76,9 @@ int main() std::rethrow_if_nested(a); assert(false); } - catch (const B& b) + catch (const B& b2) { - assert(b == B(5)); + assert(b2 == B(5)); } } } diff --git a/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp b/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp index 98006bb1e3a0..c14cb69bdea3 100644 --- a/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp +++ b/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp @@ -18,6 +18,8 @@ #include <cstdlib> #include <cassert> +#include "test_macros.h" + class A { int data_; @@ -37,7 +39,7 @@ public: friend bool operator==(const B& x, const B& y) {return x.data_ == y.data_;} }; -#if __cplusplus > 201103L +#if TEST_STD_VER > 11 struct Final final {}; #endif @@ -105,14 +107,14 @@ int main() assert(i == 7); } } -#if __cplusplus > 201103L +#if TEST_STD_VER > 11 { try { std::throw_with_nested(Final()); assert(false); } - catch (const Final &f) + catch (const Final &) { } } |