Lines Matching refs:constexpr
16 constexpr Literal() {} in Literal()
24 constexpr S(int, N::C) {} in S()
25 …constexpr S(int, NonLiteral, N::C) {} // expected-error {{constexpr constructor's 2nd parameter ty… in S()
26 …constexpr S(int, NonLiteral = 42) {} // expected-error {{constexpr constructor's 2nd parameter typ… in S()
29 constexpr S() = default;
30 constexpr S(Literal) = delete;
37 …constexpr T() {} // expected-error {{constexpr constructor not allowed in struct with virtual base… in T()
44 …constexpr C() {} // expected-error {{constexpr constructor not allowed in class with virtual base … in C()
50 constexpr U() in U()
61 constexpr V() { in V()
84 constexpr V(int(&)[1]) { in V()
88 constexpr V(int(&)[2]) { in V()
89 … constexpr int a = 0; // expected-error {{variables cannot be declared in a constexpr constructor}} in V()
91 constexpr V(int(&)[3]) { in V()
92 …constexpr int ForwardDecl(int); // expected-error {{statement not allowed in constexpr constructor… in V()
94 constexpr V(int(&)[4]) { in V()
97 constexpr V(int(&)[5]) { in V()
100 constexpr V(int(&)[6]) { in V()
103 constexpr V(int(&)[7]) { in V()
111 constexpr W() {} // expected-error {{constexpr constructor must initialize all members}} in W()
138 constexpr AnonMembers(int(&)[1]) : a(), b(), g(), h(), i(), j() {} // ok in AnonMembers()
140 …constexpr AnonMembers(int(&)[2]) : a(), c(), g(), h() {} // expected-error {{constexpr constructor… in AnonMembers()
141 constexpr AnonMembers(int(&)[3]) : a(), e(), g(), h(), i(), k() {} // ok in AnonMembers()
143 …constexpr AnonMembers(int(&)[4]) : a(), c(), d(), g(), i() {} // expected-error {{constexpr constr… in AnonMembers()
145 …constexpr AnonMembers(int(&)[5]) : a(), g(), h(), i(), k() {} // expected-error {{constexpr constr… in AnonMembers()
147 …constexpr AnonMembers(int(&)[6]) {} // expected-error {{constexpr constructor must initialize all … in AnonMembers()
151 constexpr Empty() {} // ok in Empty()
152 } constexpr empty1;
157 constexpr EmptyVariant() {} // ok in EmptyVariant()
158 } constexpr empty2;
181 constexpr TemplateInit() {} // desired-error {{must initialize all members}} in TemplateInit()
185 constexpr TemplateInit2() {} // ok in TemplateInit2()
189 constexpr weak_ptr() : p(0) {} in weak_ptr()
194 constexpr enable_shared_from_this() {} // ok in enable_shared_from_this()
196 constexpr int f(enable_shared_from_this<int>);
203 constexpr ConstexprBaseMemberCtors() : Literal(), l() {} // ok in ConstexprBaseMemberCtors()
204 …constexpr ConstexprBaseMemberCtors(char) : // expected-error {{constexpr constructor never produce… in ConstexprBaseMemberCtors()
207 …constexpr ConstexprBaseMemberCtors(double) : Literal(), // expected-error {{constexpr constructor … in ConstexprBaseMemberCtors()
223 constexpr X() {} in X()
224 constexpr X(int c) : a(c) {} // ok, b initialized by 2 * c + 1 in X()
237 constexpr Z(int a) : n(a) {} in Z()
238 …constexpr Z() : n(kGlobal) {} // expected-error {{constexpr constructor never produces a constant … in Z()
245 explicit constexpr Length(int i = 0) : val(i) { } in Length()