Commit 4c8906c9 by Jason Merrill

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

From-SVN: r259718
parent d760b068
...@@ -3,12 +3,11 @@ ...@@ -3,12 +3,11 @@
struct A 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() #define SA(X) static_assert((X),#X)
{ SA(i == 1);
bar(static_cast<void(A::*)()>(&A::foo));
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment