http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60755
--- Comment #1 from Filip Roséen <filip.roseen at gmail dot com> --- Reduced testcase: ----------------------------------------------------------------- struct A { void f () { } void g () const { [this] { f (); } (); } }; int main () { A {}.g (); } ----------------------------------------------------------------- `gcc` compiles this with no diagnostics, `clang` correctly issues: testcase.cpp:5:14: error: member function 'f' not viable: 'this' argument has type 'const A', but function is not marked const [this] { f (); } (); ^ testcase.cpp:2:8: note: 'f' declared here void f () { }