This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/43397] New: std::function can't forward rvalue reference for pointer to member function
- From: "boostcpp at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Mar 2010 21:08:16 -0000
- Subject: [Bug c++/43397] New: std::function can't forward rvalue reference for pointer to member function
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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