[Bug libstdc++/48313] std::bind with template function

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Mar 28 13:09:00 GMT 2011


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



More information about the Gcc-bugs mailing list