http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48313
Summary: std::bind with template function
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: [email protected]
ReportedBy: [email protected]
$ cat > t.cc << EOF
#include <functional>
template<class T> void func( T )
{}
int main( int, char** )
{
std::bind( func<int>, 0 );
}
EOF
$ g++ t.cc -std=gnu++0x
t.cc: In function 'int main(int, char**)':
t.cc:8:27: error: cannot bind 'void(int)' lvalue to 'void (&&)(int)'
...
This is with GCC 4.6.0. This works with GCC 4.5.2.