| // RUN: %clang_cc1 -std=c++20 -DEXPLICIT -verify %s |
| // RUN: %clang_cc1 -std=c++17 -DEXPLICIT -verify -Wno-c++20-extensions %s |
| // RUN: %clang_cc1 -std=c++14 -verify %s |
| // expected-no-diagnostics |
| f.template operator()<0>(); |
| f.template operator()<i>(); |
| template <typename F> void a1(F f) { f.operator()(0); } |
| template <typename F> void b1(F f) { |
| a1([=](auto i) { f.operator()(i); }); |
| const auto lambda = [&](auto arg1) {}; |
| [&](auto arg2) { lambda.operator()(arg2); }(0); |
| void d1(T x) { d.operator()(x); } |
| template <typename T> int e1 = [](auto){ return T(); }.operator()(T()); |