From: Jason Merrill Date: Fri, 27 Apr 2018 17:32:00 +0000 (-0400) Subject: * g++.dg/cpp1z/noexcept-type20.C: Elaborate. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4c8906c942eccf5243489d0c855892c3936f8a4b;p=gcc.git * g++.dg/cpp1z/noexcept-type20.C: Elaborate. From-SVN: r259718 --- 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);