Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/constexpr-ptrmem6.C

raw
1 // PR c++/71896
2 // { dg-do compile { target c++11 } }
3
4 struct Foo {
5 int x;
6 };
7
8 constexpr bool compare(int Foo::*t) { return t == &Foo::x; }
9
10 constexpr bool b = compare(&Foo::x);
11
12 #define SA(X) static_assert ((X),#X)
13 SA(b);