Lines Matching defs:int
4 int begin;
5 void foo(int x) {
6 for (int& it : x) { // expected-error {{invalid range expression of type 'int'; no viable 'begin' function available}}
12 operator int*();
29 int begin(int);
30 int end(int);
37 int *begin(); // expected-note 3{{selected 'begin' function with iterator type 'int *'}} expected-note {{'begin' declared here}}
38 int *end();
43 int *alt_begin();
44 int *alt_end();
57 int val;
58 operator int &() { return val; }
64 constexpr int operator*(const C::It &) { return 0; }
70 void f(int);
73 for (int a : A())
75 for (char *a : A()) { // expected-error {{cannot initialize a variable of type 'char *' with an lvalue of type 'int'}}
77 for (char *a : X::B()) { // expected-error {{cannot initialize a variable of type 'char *' with an lvalue of type 'int'}}
86 for (auto *a : A()) { // expected-error {{variable 'a' with type 'auto *' has incompatible initializer of type 'int'}}
89 for (A NS:A()) { // expected-error {{no viable conversion from 'int' to 'X::A'}}
106 extern int incomplete[];
107 for (auto a : incomplete) // expected-error {{cannot use incomplete type 'int []' as a range}}
121 int *begin(); // expected-note {{selected 'begin' function with iterator type 'int *'}}
124 for (auto a : Differ()) // expected-error {{'begin' and 'end' must return the same type (got 'int *' and 'null_t')}}
130 for (extern int a : A()) {} // expected-error {{loop variable 'a' may not be declared 'extern'}}
131 for (static int a : A()) {} // expected-error {{loop variable 'a' may not be declared 'static'}}
132 for (register int a : A()) {} // expected-error {{loop variable 'a' may not be declared 'register'}} expected-warning {{deprecated}}
133 for (constexpr int a : X::C()) {} // OK per CWG issue #1204.
182 int *begin();
183 int *end();
185 for (int n : NoCopy()) { // ok
188 for (int n : 42) { // expected-error {{invalid range expression of type 'int'; no viable 'begin' function available}}
197 for (U u : t) { // expected-error {{no viable conversion from 'X::A' to 'int'}}
203 template void h<A, int>(A);
206 template void h<A(&)[13], int>(A(&)[13]); // expected-note {{requested here}}
221 int *begin(StdBeginEnd);
222 int *end(StdBeginEnd);
230 int *begin(ADL); // expected-note {{no known conversion from 'NS::NoADL' to 'NS::ADL'}}
231 int *end(ADL);
235 int *begin(NS::NoADL);
236 int *end(NS::NoADL);
253 int array[5] = { 1, 2, 3, 4, 5 };
254 for (int &x : array)
261 auto &x = t.get(); // expected-error{{member reference base type 'const int' is not a structure or union}}
265 template void foo(const int&); // expected-note{{in instantiation of function template specialization}}