diff options
author | Jason Merrill <jason@gcc.gnu.org> | 2018-04-27 13:32:00 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2018-04-27 13:32:00 -0400 |
commit | 4c8906c942eccf5243489d0c855892c3936f8a4b (patch) | |
tree | 482c25977c71440dea1ce43d0e5573eb1c9c5048 /gcc | |
parent | d760b06868d660bc4b934caf64d2e0a5e69193d1 (diff) | |
download | gcc-4c8906c942eccf5243489d0c855892c3936f8a4b.zip gcc-4c8906c942eccf5243489d0c855892c3936f8a4b.tar.gz gcc-4c8906c942eccf5243489d0c855892c3936f8a4b.tar.bz2 |
* g++.dg/cpp1z/noexcept-type20.C: Elaborate.
From-SVN: r259718
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp1z/noexcept-type20.C | 11 |
1 files 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 a6033f7..2e4412d 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<typename T> void bar(T); +constexpr auto p = static_cast<int (A::*)() const>(&A::foo); +constexpr int i = (A().*p)(); -void baz() -{ - bar(static_cast<void(A::*)()>(&A::foo)); -} +#define SA(X) static_assert((X),#X) +SA(i == 1); |