std::function can't forward rvalue reference for pointer to member function
struct Foo { void operator() ( int && ) { } void func( int && ) { } } ; int main() { Foo foo ; // OK std::function< void ( int && ) > f1( foo ) ; f1(0) ; // Error std::function< void ( Foo &, int && ) > f2( &Foo::func ) ; f2(foo, 0) ; } -- Summary: std::function can't forward rvalue reference for pointer to member function Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: boostcpp at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43397