It looks like an issue. When I'm trying to access to static method from lambda defined in another method I'm getting following error: Compilation finished with errors: source.cpp: In lambda function: source.cpp:7:22: error: 'this' was not captured for this lambda function Sample code: struct Test { static void func1() {} void func2() { auto f = []() { Test::func1(); }; } }; int main() {} It's could be easily reproduced on gcc 4.7.3 and bellow. I haven't checked iso standard for right behavior - but it seems msvc and clang compilers work fine with this example. Also it gets ok when I pass this to lambda.
The problem also exists for gcc 4.8.0 20121209 (experimental), I agree that the code should be accepted.
Same issue as 51494. *** This bug has been marked as a duplicate of bug 51494 ***