This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/48313] std::bind with template function
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 28 Mar 2011 12:43:18 +0000
- Subject: [Bug libstdc++/48313] std::bind with template function
- Auto-submitted: auto-generated
- References: <bug-48313-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48313
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-03-28 12:43:12 UTC ---
It's not the _Bind constructor, it's the bind() call itself, this demonstrates
the problem:
template<typename _Functor, typename... _ArgTypes>
inline
void
bind(_Functor&& __f, _ArgTypes&&... __args) { }
template<class T> void func( T )
{}
int main( int, char** )
{
bind( func<int>, 0 );
}
we might just need to overload std::bind for function types
std::bind() in 4.5 was defined differently as it didn't support rvalues
properly, so didn't show the problem