https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67274
--- Comment #1 from Vittorio Romeo <vittorio.romeo at outlook dot com> --- More test cases, using minor variations to the code posted above: With bar() = call([this](auto x){ foo(x); }); clang++ 3.6+ compiles. g++ 5.2+ does not compile. With bar() = call([this](auto x){ this->foo(x); }); clang++ 3.6+ compiles. g++ 5.2+ compiles. With bar() = call([this](int x){ foo(x); }); clang++ 3.6+ compiles. g++ 5.2+ compiles. With bar() = [this](auto x){ foo(x); }(1); clang++ 3.6+ compiles. g++ 5.2+ compiles.