* g++.dg/cpp1z/noexcept-type20.C: Elaborate.

From-SVN: r259718
This commit is contained in:
Jason Merrill 2018-04-27 13:32:00 -04:00
parent d760b06868
commit 4c8906c942
1 changed files with 5 additions and 6 deletions

View File

@ -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);