Home | History | Annotate | Download | only in dcl.spec.auto

Lines Matching full:auto

4   auto a = a; // expected-error{{variable 'a' declared with 'auto' type cannot appear in its own initializer}}
5 auto *b = b; // expected-error{{variable 'b' declared with 'auto' type cannot appear in its own initializer}}
6 const auto c = c; // expected-error{{variable 'c' declared with 'auto' type cannot appear in its own initializer}}
7 if (auto d = d) {} // expected-error {{variable 'd' declared with 'auto' type cannot appear in its own initializer}}
8 auto e = ({ auto f = e; 0; }); // expected-error {{variable 'e' declared with 'auto' type cannot appear in its own initializer}}
12 auto a; // expected-error{{declaration of variable 'a' with type 'auto' requires an initializer}}
14 auto *b; // expected-error{{declaration of variable 'b' with type 'auto *' requires an initializer}}
16 if (auto b) {} // expected-error {{must have an initializer}}
17 for (;auto b;) {} // expected-error {{must have an initializer}}
18 while (auto b) {} // expected-error {{must have an initializer}}
19 if (auto b = true) { (void)b; }
22 auto n(1,2,3); // expected-error{{initializer for variable 'n' with type 'auto' contains multiple expressions}}
26 auto a = "const char [16]", *p = &a;
30 auto b = 42ULL;
32 for (auto c = 0; c < b; ++c) {
40 auto x = 5;
41 const auto *v = &x, u = 6;
42 static auto y = 0.0;
43 // In C++98: 'auto' storage class specifier is redundant and incompatible with C++0x
44 // In C++0x: 'auto' storage class specifier is not permitted in C++0x, and will not be supported in future releases
45 auto int r; // expected-warning {{'auto' storage class specifier}}
59 static constexpr auto (*p)(T) = &f;
69 static constexpr auto (T::*p) = &K::n;
74 using X = auto(int) -> auto(*)(T) -> auto(*)(char) -> long;
77 //static constexpr auto (*p)(int) -> auto(*)(T) -> auto(*)(char) = &x; // ill-formed
78 static constexpr auto (*(*(*p)(int))(T))(char) = &x; // ok
84 new (auto(*)(T)) (&g);
90 auto fail((unknown)); // expected-error{{use of undeclared identifier 'unknown'}}