Lines Matching full:constexpr
9 // - absence or presence of constexpr
12 constexpr A(X<1>) {}
14 explicit constexpr A(X<3>) {} // expected-note 2{{here}}
19 constexpr A a0c { X<0>{} }; // expected-error {{must be initialized by a constant expression}} expected-note {{non-constexpr}}
20 constexpr A a0ic = { X<0>{} }; // expected-error {{must be initialized by a constant expression}} expected-note {{non-constexpr}}
24 constexpr A a1c { X<1>{} };
25 constexpr A a1ic = { X<1>{} };
29 constexpr A a2c { X<2>{} }; // expected-error {{must be initialized by a constant expression}} expected-note {{non-constexpr}}
30 constexpr A a2ic = { X<2>{} }; // expected-error {{constructor is explicit}}
34 constexpr A a3c { X<3>{} };
35 constexpr A a3ic = { X<3>{} }; // expected-error {{constructor is explicit}}
44 constexpr B b0c { X<0>{} }; // expected-error {{must be initialized by a constant expression}} expected-note {{non-constexpr}}
45 constexpr B b0ic = { X<0>{} }; // expected-error {{must be initialized by a constant expression}} expected-note {{non-constexpr}}
49 constexpr B b1c { X<1>{} };
50 constexpr B b1ic = { X<1>{} };
54 constexpr B b2c { X<2>{} }; // expected-error {{must be initialized by a constant expression}} expected-note {{non-constexpr}}
55 constexpr B b2ic = { X<2>{} }; // expected-error {{constructor is explicit}}
59 constexpr B b3c { X<3>{} };
60 constexpr B b3ic = { X<3>{} }; // expected-error {{constructor is explicit}}
63 // 'constexpr' is OK even if the constructor doesn't obey the constraints.
65 struct NonConstexpr { NonConstexpr(); constexpr NonConstexpr(int); }; // expected-note {{here}}
66 struct Constexpr { constexpr Constexpr(int) {} };
68 struct BothNonLiteral : NonLiteral, Constexpr { using Constexpr::Constexpr; }; // expected-note {{base class 'NonLiteral' of non-literal type}}
69 constexpr BothNonLiteral bothNL{42}; // expected-error {{constexpr variable cannot have non-literal type 'const BothNonLiteral'}}
71 struct BothNonConstexpr : NonConstexpr, Constexpr { using Constexpr::Constexpr; }; // expected-note {{non-constexpr constructor 'NonConstexpr}}
72 constexpr BothNonConstexpr bothNC{42}; // expected-error {{must be initialized by a constant expression}} expected-note {{in call to 'BothNonConstexpr(42)'}}
76 constexpr ConstexprEval(int a, const char *p) : k(p[a]) {}
85 constexpr ConstexprEval3 ce{4, "foobar"};