Debian Codegraph @

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

raw
1 // PR c++/58611
2 // { dg-do compile { target c++11 } }
3
4 struct A
5 {
6 int i;
7 constexpr A() {} // { dg-error "A::i" "" { target c++17_down } }
8 };
9
10 struct B
11 {
12 A a;
13 };
14
15 constexpr B b[] = { {} }; // { dg-error "A::A" "" { target c++17_down } }
16 // { dg-error "is not a constant expression" "" { target c++2a } .-1 }