diff options
Diffstat (limited to 'test/CXX/class/class.mem/p2.cpp')
-rw-r--r-- | test/CXX/class/class.mem/p2.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/CXX/class/class.mem/p2.cpp b/test/CXX/class/class.mem/p2.cpp index 3e957df69d..bf7b3d49c9 100644 --- a/test/CXX/class/class.mem/p2.cpp +++ b/test/CXX/class/class.mem/p2.cpp @@ -60,8 +60,16 @@ namespace test3 { namespace PR12629 { struct S { static int (f)() throw(); - static int ((((((g))))() throw(int))); + static int ((((((g))))() throw(U))); + int (*h)() noexcept(false); + static int (&i)() noexcept(true); + static int (*j)() throw(U); // expected-error {{type name}} \ + // expected-error {{expected ')'}} expected-note {{to match}} + + struct U {}; }; static_assert(noexcept(S::f()), ""); static_assert(!noexcept(S::g()), ""); + static_assert(!noexcept(S().h()), ""); + static_assert(noexcept(S::i()), ""); } |