1 // RUN: %clang_cc1 -std=c++2a -fsyntax-only -emit-llvm-only %s 2 // RUN: %clang_cc1 -std=c++2a -fsyntax-only -fdelayed-template-parsing %s 3 // RUN: %clang_cc1 -std=c++2a -fsyntax-only -fms-extensions %s 4 // RUN: %clang_cc1 -std=c++2a -fsyntax-only -fdelayed-template-parsing -fms-extensions %s 5 6 namespace PR45881 { 7 struct A { 8 void f(); 9 }; 10 int id(A*); 11 void A::f() { 12 auto z = [*this](auto z2, decltype(z2(this)) z3){}; 13 z(id,3); 14 } 15 16 struct B { 17 void f(); 18 }; 19 void B::f() { 20 auto z = []<typename TT, typename TTT=decltype(TT()(this))>(){return 0;}; 21 z.template operator()<int(*)(B*)>(); 22 } 23 24 struct C { 25 void f(); 26 }; 27 void C::f() { 28 auto z = []<typename TT, decltype(TT()(this)) n>(){return 0;}; 29 z.template operator()<int(*)(C*), 8>(); 30 } 31 } // namespace PR45881 32