Lines Matching refs:constexpr
13 constexpr int i1 = 0;
14 constexpr int f1() { return 0; } in f1()
16 constexpr static int mi1 = 0;
19 constexpr int s1::mi2 = 0;
23 constexpr extern int i2; // expected-error {{constexpr variable declaration must be a definition}}
25 constexpr notlit nl1; // expected-error {{constexpr variable cannot have non-literal type 'const no…
27 void f2(constexpr int i) {} // expected-error {{function parameter cannot be constexpr}} in f2()
30 …constexpr int mi1; // expected-error {{non-static data member cannot be constexpr; did you intend …
31 static constexpr int mi2;
37 …mutable constexpr int mi3 = 3; // expected-error-re {{non-static data member cannot be constexpr{{…
40 typedef constexpr int CI; // expected-error {{typedef cannot be constexpr}}
42 constexpr class C1 {}; // expected-error {{class cannot be marked constexpr}}
43 constexpr struct S1 {}; // expected-error {{struct cannot be marked constexpr}}
44 constexpr union U1 {}; // expected-error {{union cannot be marked constexpr}}
45 constexpr enum E1 {}; // expected-error {{enum cannot be marked constexpr}}
46 template <typename T> constexpr class TC1 {}; // expected-error {{class cannot be marked constexpr}}
47 template <typename T> constexpr struct TS1 {}; // expected-error {{struct cannot be marked constexp…
48 template <typename T> constexpr union TU1 {}; // expected-error {{union cannot be marked constexpr}}
49 class C2 {} constexpr; // expected-error {{class cannot be marked constexpr}}
50 struct S2 {} constexpr; // expected-error {{struct cannot be marked constexpr}}
51 union U2 {} constexpr; // expected-error {{union cannot be marked constexpr}}
52 enum E2 {} constexpr; // expected-error {{enum cannot be marked constexpr}}
53 constexpr class C3 {} c3 = C3();
54 constexpr struct S3 {} s3 = S3();
55 constexpr union U3 {} u3 = {};
56 constexpr enum E3 { V3 } e3 = V3;
57 class C4 {} constexpr c4 = C4();
58 struct S4 {} constexpr s4 = S4();
59 union U4 {} constexpr u4 = {};
60 enum E4 { V4 } constexpr e4 = V4;
61 constexpr int; // expected-error {{constexpr can only be used in variable and function declarations…
63 constexpr int f3(); // expected-note {{previous declaration is here}}
66 constexpr int f4(); // expected-error {{constexpr declaration of 'f4' follows non-constexpr declara…
67 template<typename T> constexpr T f5(T);
68 template<typename T> constexpr T f5(T); // expected-note {{previous}}
71 template<typename T> constexpr T f6(T); // expected-error {{constexpr declaration of 'f6' follows n…
74 constexpr ~ConstexprDtor() = default; // expected-error {{destructor cannot be marked constexpr}}
78 template <typename T> constexpr T ft(T t) { return t; } in ft()
81 …template<typename T> constexpr T f(); // expected-warning 0-1{{C++14}} expected-note 0-1{{candidat…
89 template <> constexpr char ft(char nl); // expected-error {{constexpr declaration of 'ft<char>' fol…
90 template <> constexpr int gt(int nl) { return nl; } in gt()
95 template <> constexpr int S::g() { return 0; } // expected-note {{previous}} in g()
106 constexpr int i3 = ft(1);
115 constexpr int square(int x); // expected-note {{declared here}}
116 constexpr int bufsz = 1024;
118 constexpr struct pixel { // expected-error {{struct cannot be marked constexpr}}
121 constexpr pixel(int);
124 constexpr pixel::pixel(int a) in pixel()
128 constexpr pixel small(2); // expected-error {{must be initialized by a constant expression}} expect…
130 constexpr int square(int x) { in square()
134 constexpr pixel large(4);
136 int next(constexpr int x) { // expected-error {{function parameter cannot be constexpr}} in next()
140 extern constexpr int memsz; // expected-error {{constexpr variable declaration must be a definition…
144 static constexpr int n = 0;