Lines Matching defs:auto

8 void g(this auto); // expected-error{{an explicit object parameter cannot appear in a non-member function}}
10 auto l1 = [] (this auto) static {}; // expected-error{{an explicit object parameter cannot appear in a static lambda}}
11 auto l2 = [] (this auto) mutable {}; // expected-error{{a lambda with an explicit object parameter cannot be mutable}}
12 auto l3 = [](this auto...){}; // expected-error {{the explicit object parameter cannot be a function parameter pack}}
13 auto l4 = [](int, this auto){}; // expected-error {{an explicit object parameter can only appear as the first parameter of the lambda}}
16 static void f(this auto); // expected-error{{an explicit object parameter cannot appear in a static function}}
23 void g(this auto) const; // expected-error{{explicit object member function cannot have 'const' qualifier}}
24 void h(this auto) &; // expected-error{{explicit object member function cannot have '&' qualifier}}
25 void i(this auto) &&; // expected-error{{explicit object member function cannot have '&&' qualifier}}
26 void j(this auto) volatile; // expected-error{{explicit object member function cannot have 'volatile' qualifier}}
27 void k(this auto) __restrict; // expected-error{{explicit object member function cannot have '__restrict' qualifier}}
28 void l(this auto) _Nonnull; // expected-error{{explicit object member function cannot have '' qualifie}}
31 void variadic(this auto...); // expected-error{{the explicit object parameter cannot be a function parameter pack}}
32 void not_first(int, this auto); // expected-error {{an explicit object parameter can only appear as the first parameter of the function}}
34 S(this auto); // expected-error {{an explicit object parameter cannot appear in a constructor}}
60 struct Test { void f(this const auto& = Test{}); };
62 auto L = [](this const auto& = Test{}){};
69 void f(this auto) {
83 void bar(this auto) {
93 Test(auto&&);
102 auto ok = [i = 0](this const Derived&) {};
103 auto ko = [i = 0](this const Test&) {};
114 auto alsoOk = [](this const Test &) {};
119 auto nothingIsOkay = [i = 0](this const Frobble &) {}; // expected-note {{candidate function not viable: requires 0 non-object arguments, but 1 was provided}}
186 (void)[=](this auto&&) { return i; }();
187 (void)[=](this const auto&) { return i; }();
191 auto l = [=](this auto&) {};
198 [i = 0](this auto &&){ i++; }();
199 [i = 0](this auto){ i++; }();
200 [i = 0](this const auto&){ i++; }(); // expected-error {{cannot assign to a variable captured by copy in a non-mutable lambda}}
203 const auto l1 = [x](this auto&) { x = 42; }; // expected-error {{cannot assign to a variable captured by copy in a non-mutable lambda}}
204 const auto l2 = [=](this auto&) { x = 42; }; // expected-error {{cannot assign to a variable captured by copy in a non-mutable lambda}}
206 const auto l3 = [&x](this auto&) {
207 const auto l3a = [x](this auto&) { x = 42; }; // expected-error {{cannot assign to a variable captured by copy in a non-mutable lambda}}
211 const auto l4 = [&x](this auto&) {
212 const auto l4a = [=](this auto&) { x = 42; }; // expected-error {{cannot assign to a variable captured by copy in a non-mutable lambda}}
216 const auto l5 = [x](this auto&) {
217 const auto l5a = [x](this auto&) { x = 42; }; // expected-error {{cannot assign to a variable captured by copy in a non-mutable lambda}}
221 const auto l6 = [=](this auto&) {
222 const auto l6a = [=](this auto&) { x = 42; }; // expected-error {{cannot assign to a variable captured by copy in a non-mutable lambda}}
226 const auto l7 = [x](this auto&) {
227 const auto l7a = [=](this auto&) { x = 42; }; // expected-error {{cannot assign to a variable captured by copy in a non-mutable lambda}}
231 const auto l8 = [=](this auto&) {
232 const auto l8a = [x](this auto&) { x = 42; }; // expected-error {{cannot assign to a variable captured by copy in a non-mutable lambda}}
236 const auto l9 = [&](this auto&) {
237 const auto l9a = [x](this auto&) { x = 42; }; // expected-error {{cannot assign to a variable captured by copy in a non-mutable lambda}}
241 const auto l10 = [&](this auto&) {
242 const auto l10a = [=](this auto&) { x = 42; }; // expected-error {{cannot assign to a variable captured by copy in a non-mutable lambda}}
246 const auto l11 = [x](this auto&) {
247 const auto l11a = [&x](this auto&) { x = 42; }; // expected-error {{cannot assign to a variable captured by copy in a non-mutable lambda}} expected-note {{while substituting}}
251 const auto l12 = [x](this auto&) {
252 const auto l12a = [&](this auto&) { x = 42; }; // expected-error {{cannot assign to a variable captured by copy in a non-mutable lambda}} expected-note {{while substituting}}
256 const auto l13 = [=](this auto&) {
257 const auto l13a = [&x](this auto&) { x = 42; }; // expected-error {{cannot assign to a variable captured by copy in a non-mutable lambda}} expected-note {{while substituting}}
263 auto f() {
264 return [*this] (this auto&&) {
267 [*this] (this auto&&) { x = 42; } ();
269 const auto l = [*this] (this auto&&) { x = 42; }; // expected-error {{read-only variable is not assignable}}
274 auto g() {
275 return [&] (this auto&&) {
277 const auto l = [*this] (this auto&&) { x = 42; }; // expected-error {{read-only variable is not assignable}}
283 const auto l2 = T{}.g();
289 const auto l14 = S{}.f();
307 const auto l1 = [&x](this auto&) { x = 42; };
308 const auto l2 = [&](this auto&) { x = 42; };
314 const auto l15 = [=](this auto&&) [[clang::annotate_type("foo")]] [[clang::annotate_type("bar")]] {
318 const auto l16 = [=]() [[clang::annotate_type("foo")]] [[clang::annotate_type("bar")]] {
382 void f(this auto &&, auto, auto); // expected-note {{requires 2 non-object arguments, but 0 were provided}}
383 void g(this auto &&, auto, auto); // expected-note {{requires 2 non-object arguments, but 3 were provided}}
384 void h(this auto &&, int, int i = 0); // expected-note {{requires at least 1 non-object argument, but 0 were provided}}
409 void f(this auto &&) {}
458 operator int(this auto&& self) {
462 Wrap* operator->(this auto&& self) {
466 int operator[](this auto&& self, int) {
470 int operator()(this auto&& self, int) {
474 int operator++(this auto&& self, int) {
478 int operator++(this auto&& self) {
482 int operator--(this auto&& self, int) {
486 int operator--(this auto&& self) {
490 int operator*(this auto&& self) {
494 bool operator==(this auto&& self, int) {
498 bool operator<=>(this auto&& self, int) {
502 bool operator<<(this auto&& self, int b) {
643 struct A { operator int(this auto&&); }; //expected-note {{candidate}}
647 struct B { operator X(this auto&&); };
678 S(this auto &self) {} // expected-error {{an explicit object parameter cannot appear in a constructor}}
680 void g(this auto &self) const {} // expected-error {{explicit object member function cannot have 'const' qualifier}}
761 auto serialize(auto&& archive, auto&& c){ }
763 auto serialize(this auto&& self, auto&& archive) {
771 auto f(this auto self...) { }
783 auto foo() {
784 return [*this](this auto&&) {
792 const auto l = s.foo();
795 const auto g = [x = 10](this auto&& self) { x = 20; }; // expected-error {{cannot assign to a variable captured by copy in a non-mutable lambda}}
807 [&cursor_guard](this auto self) {
817 [&list](this auto self) {
827 [&list](this auto self) {
837 [&list](this auto self) {
845 template<auto N>
846 void operator+=(this auto &&, const char (&)[N]);
847 void operator+=(this auto &&, auto &&) = delete;
849 void f1(this A &, auto &);
850 void f1(this A &, auto &&) = delete;
852 void f2(this auto&);
853 void f2(this auto&&) = delete;
855 void f3(auto&) &;
856 void f3(this A&, auto&&) = delete;
858 void f4(auto&&) & = delete;
859 void f4(this A&, auto&);
861 static void f5(auto&);
862 void f5(this A&, auto&&) = delete;
864 static void f6(auto&&) = delete;
865 void f6(this A&, auto&);
878 void operator-(this A&, auto&&) = delete;
879 friend void operator-(A&, auto&);
881 void operator*(this A&, auto&);
882 friend void operator*(A&, auto&&) = delete;
969 void a::f(this auto) {} // expected-error {{an explicit object parameter cannot appear in a non-member function}}
981 [x = X{}](this auto) {}();
985 std::move([x = X{}](this auto) {})();
989 void f(this auto &&self, int &&r_value_ref) {} // expected-note {{candidate function template not viable: expects an rvalue for 2nd argument}}
1036 template<auto N>
1038 void operator()(this auto &&, auto &&);
1046 template<auto N>
1047 void operator()(this auto &&, const char (&)[N]);
1048 static void operator()(auto &&);
1056 template<auto N>
1058 void operator[](this auto &&, auto &&);
1066 template<auto N>
1067 void operator[](this auto &&, const char (&)[N]);
1068 static void operator[](auto &&);
1080 constexpr auto operator[](this T &&self, auto... i) // expected-note {{candidate template ignored: substitution failure [with T = Foo &, i:auto = <>]: member '_evaluate' used before its declaration}}
1087 constexpr auto _evaluate(this T &&self, auto... i) -> decltype((i + ...));