From 4c8906c942eccf5243489d0c855892c3936f8a4b Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Fri, 27 Apr 2018 13:32:00 -0400 Subject: [PATCH] * g++.dg/cpp1z/noexcept-type20.C: Elaborate. From-SVN: r259718 --- gcc/testsuite/g++.dg/cpp1z/noexcept-type20.C | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gcc/testsuite/g++.dg/cpp1z/noexcept-type20.C b/gcc/testsuite/g++.dg/cpp1z/noexcept-type20.C index a6033f71a4f..2e4412d0e77 100644 --- a/gcc/testsuite/g++.dg/cpp1z/noexcept-type20.C +++ b/gcc/testsuite/g++.dg/cpp1z/noexcept-type20.C @@ -3,12 +3,11 @@ struct A { - void foo() noexcept; + constexpr int foo() const noexcept { return 1; } }; -template void bar(T); +constexpr auto p = static_cast(&A::foo); +constexpr int i = (A().*p)(); -void baz() -{ - bar(static_cast(&A::foo)); -} +#define SA(X) static_assert((X),#X) +SA(i == 1); -- 2.30.2