Home | History | Annotate | Download | only in SemaCXX

Lines Matching defs:int

4   int n : 3 = 7; // expected-error {{bitfield member cannot have an in-class initializer}}
7 int a;
9 int &n = a;
11 int &GetN() { return n; }
15 int k;
17 int &n = // expected-error {{cannot use defaulted default constructor of 'Recurse' within the class outside of member functions because 'n' has an initializer}}
24 int as[] = { 1, 2, 3 }; // expected-error {{array bound cannot be deduced from an in-class initializer}}
25 int bs[4] = { 4, 5, 6, 7 };
26 int cs[] = { 8, 9, 10 }; // expected-error {{array bound cannot be deduced from an in-class initializer}}
29 template<int n> struct T { static const int B; };
30 template<> struct T<2> { template<int C, int D> using B = int; };
31 const int C = 0, D = 0;
33 int as[] = { decltype(x)::B<C, D>(0) }; // expected-error {{array bound cannot be deduced from an in-class initializer}}
34 T<sizeof(as) / sizeof(int)> x;
36 operator int[](){}; // expected-error {{'operator int' cannot be the name of a variable or data member}} \
40 struct ThrowCtor { ThrowCtor(int) noexcept(false); };
41 struct NoThrowCtor { NoThrowCtor(int) noexcept(true); };
51 int n = 0;
59 typedef int A = 0; // expected-error {{illegal initializer}}
67 T* x = 1; // expected-error{{cannot initialize a variable of type 'int *' with an rvalue of type 'int'}}
71 struct Y : X<int> {
75 Y::Y() try { // expected-note{{in instantiation of member function 'PR10578::X<int>::X' requested here}}
108 struct X { int m; };
112 int f();
114 struct Y { int b = f(); };
122 struct B { int m1 = sizeof(A) + sizeof(T); };
123 B<int> m2;
132 int m1 = 0; // expected-error {{cannot use defaulted default constructor of 'B' within 'A' outside of member functions because 'm1' has an initializer}}
134 // expected-note@+1 {{implicit default constructor for 'template_default_ctor::A::B<int>' first required here}}
135 enum { NOE = noexcept(B<int>()) };
142 int m1 = 0; // expected-error {{cannot use defaulted default constructor of 'B' within 'A' outside of member functions because 'm1' has an initializer}}
154 int m1 = 0; // expected-error {{cannot use defaulted default constructor of 'C' within 'A' outside of member functions because 'm1' has an initializer}}
158 int m1 = 0; // expected-error {{cannot use defaulted default constructor of 'D' within 'A' outside of member functions because 'm1' has an initializer}}
162 // expected-note@+1 {{implicit default constructor for 'member_template::A::B<int>::C' first required here}}
163 NOE1 = noexcept(B<int>::C()),
164 // expected-note@+1 {{implicit default constructor for 'member_template::A::B<int>::D<int>' first required here}}
165 NOE2 = noexcept(B<int>::D<int>())
173 int n = T::error; // expected-error {{type 'float' cannot be used prior to '::' because it has no members}}
175 template struct X<int>; // ok
183 int n = T::error; // expected-error {{type 'int' cannot be used prior to '::' because it has no members}}
186 void g() { f<int>(); } // expected-note {{in instantiation of function template specialization 'local_class::f<int>' requested here}}
190 template <int N>
192 int x[3] = {[N] = 3};