https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67952
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid Status|UNCONFIRMED |NEW Last reconfirmed| |2015-10-13 Summary|Compilation error with |[C++14] Compilation error |boost::signals2 and generic |with boost::signals2 and |lambda: cannot call member |generic lambda: cannot call |function without object |member function without | |object Ever confirmed|0 |1 Known to fail| |4.9.3, 5.2.0, 6.0 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- Nothing to do with Boost, so it doesn't need thousands of lines of Boost headers to reproduce it: template<typename F> struct signal; template<typename R, typename... Args> struct signal<R(Args...)> { template<typename F> void connect(F f) { f( Args{}... ); } }; class A { public: A() { // these two work sig2.connect( [this]() {f();} ); sig.connect( [this](auto x) {this->g(x);} ); // this does not work sig.connect( [this](auto x) {g(x);} ); } private: void f(); void g(int); signal<void (int)> sig; signal<void ()> sig2; };