This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/48313] New: std::bind with template function
- From: "joerg dot richter at pdv-fs dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 28 Mar 2011 11:27:25 +0000
- Subject: [Bug libstdc++/48313] New: std::bind with template function
- Auto-submitted: auto-generated
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: unassigned@gcc.gnu.org
ReportedBy: joerg.richter@pdv-fs.de
$ 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.