Lines Matching refs:constexpr
17 constexpr Literal() {} in Literal()
25 constexpr S(int, N::C) {} in S()
26 …constexpr S(int, NonLiteral, N::C) {} // expected-error {{constexpr constructor's 2nd parameter ty… in S()
27 …constexpr S(int, NonLiteral = 42) {} // expected-error {{constexpr constructor's 2nd parameter typ… in S()
30 constexpr S() = default;
31 constexpr S(Literal) = delete;
38 …constexpr T() {} // expected-error {{constexpr constructor not allowed in struct with virtual base… in T()
45 …constexpr C() {} // expected-error {{constexpr constructor not allowed in class with virtual base … in C()
51 constexpr U() in U()
62 constexpr V() { in V()
85 constexpr V(int(&)[1]) { in V()
92 constexpr V(int(&)[2]) { in V()
93 constexpr int a = 0; in V()
98 constexpr V(int(&)[3]) { in V()
99 constexpr int ForwardDecl(int); in V()
104 constexpr V(int(&)[4]) { in V()
110 constexpr V(int(&)[5]) { in V()
116 constexpr V(int(&)[6]) { in V()
122 constexpr V(int(&)[7]) { in V()
133 constexpr W() {} // expected-error {{constexpr constructor must initialize all members}} in W()
160 constexpr AnonMembers(int(&)[1]) : a(), b(), g(), h(), i(), j() {} // ok in AnonMembers()
162 …constexpr AnonMembers(int(&)[2]) : a(), c(), g(), h() {} // expected-error {{constexpr constructor… in AnonMembers()
163 constexpr AnonMembers(int(&)[3]) : a(), e(), g(), h(), i(), k() {} // ok in AnonMembers()
165 …constexpr AnonMembers(int(&)[4]) : a(), c(), d(), g(), i() {} // expected-error {{constexpr constr… in AnonMembers()
167 …constexpr AnonMembers(int(&)[5]) : a(), g(), h(), i(), k() {} // expected-error {{constexpr constr… in AnonMembers()
169 …constexpr AnonMembers(int(&)[6]) {} // expected-error {{constexpr constructor must initialize all … in AnonMembers()
173 constexpr Empty() {} // ok in Empty()
174 } constexpr empty1;
179 constexpr EmptyVariant() {} // ok in EmptyVariant()
180 } constexpr empty2;
203 constexpr TemplateInit() {} // desired-error {{must initialize all members}} in TemplateInit()
207 constexpr TemplateInit2() {} // ok in TemplateInit2()
211 constexpr weak_ptr() : p(0) {} in weak_ptr()
216 constexpr enable_shared_from_this() {} // ok in enable_shared_from_this()
218 constexpr int f(enable_shared_from_this<int>);
225 constexpr ConstexprBaseMemberCtors() : Literal(), l() {} // ok in ConstexprBaseMemberCtors()
226 …constexpr ConstexprBaseMemberCtors(char) : // expected-error {{constexpr constructor never produce… in ConstexprBaseMemberCtors()
229 …constexpr ConstexprBaseMemberCtors(double) : Literal(), // expected-error {{constexpr constructor … in ConstexprBaseMemberCtors()
245 constexpr X() {} in X()
246 constexpr X(int c) : a(c) {} // ok, b initialized by 2 * c + 1 in X()
249 union XU1 { int a; constexpr XU1() = default; }; // expected-error{{not constexpr}}
250 union XU2 { int a = 1; constexpr XU2() = default; };
256 constexpr XU3() = default; // expected-error{{not constexpr}}
262 constexpr XU4() = default;
278 constexpr Z(int a) : n(a) {} in Z()
279 …constexpr Z() : n(kGlobal) {} // expected-error {{constexpr constructor never produces a constant … in Z()
286 explicit constexpr Length(int i = 0) : val(i) { } in Length()
295 constexpr A(const A&) {} in A()
297 constexpr A(int = 0);
302 constexpr B(const B&);
303 constexpr B(B&);
305 constexpr B::B(const B&) = default;
306 constexpr B::B(B&) = default; // expected-error {{not constexpr}}
311 constexpr C(const C&);
312 constexpr C(C&);
314 constexpr C::C(const C&) = default;
315 constexpr C::C(C&) = default; // expected-error {{not constexpr}}
327 constexpr V() : x(0) {} in V()
333 …constexpr V<int> v; // expected-error {{constant expression}} expected-note {{subobject of type 'i…
335 constexpr int k = V<int>().x; // FIXME: ok?