Debian Codegraph @

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

raw
1 // { dg-do compile { target c++11 } }
2 // { dg-options "-fno-elide-constructors" }
3
4 struct A
5 {
6 void *p;
7 constexpr A(): p(this) {}
8 };
9
10 constexpr A a;
11 constexpr A b = A(); // { dg-error "" "" { target c++14_down } }
12
13 #define SA(X) static_assert ((X), #X)
14 SA(a.p == &a);