Hi, adding the testcase and closing the PR as fixed.
Thanks, Paolo. ////////////////////////
2012-10-10 Paolo Carlini <paolo.carl...@oracle.com> PR c++/53741 * g++.dg/cpp0x/lambda/lambda-ice9.C: New.
Index: g++.dg/cpp0x/lambda/lambda-ice9.C =================================================================== --- g++.dg/cpp0x/lambda/lambda-ice9.C (revision 0) +++ g++.dg/cpp0x/lambda/lambda-ice9.C (working copy) @@ -0,0 +1,18 @@ +// PR c++/53741 +// { dg-do compile { target c++11 } } + +struct X +{ + template <class T> static void bar() {} + + template <class T> void foo(T p) + { + [&] { bar<T>(); }; + } +}; + +int main() +{ + X x; + x.foo(3); +}