1 // { dg-do compile { target c++11 } }
7 // p 1 constexpr specifier
8 // objects, static const data
9 struct A1 { int i; }; // { dg-message "no user-provided default constructor" }
11 constexpr int i1 = 1024;
12 constexpr A1 a1 = A1();
14 // error: not a definition
15 extern constexpr int i2; // { dg-error "definition" }
17 // error: missing initializer
18 constexpr A1 a2; // { dg-error "uninitialized const" }
20 const constexpr A1 a3 = A1();
22 volatile constexpr A1 a4 = A1(); // { dg-bogus "both .volatile. and .constexpr. cannot" }
24 // error: on type declaration
25 constexpr struct pixel // { dg-error "cannot be used for type declarations" }