Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp0x/constexpr-ptrmem6.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
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); |