* g++.dg/cpp1z/noexcept-type20.C: Elaborate.
From-SVN: r259718
This commit is contained in:
parent
d760b06868
commit
4c8906c942
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue