This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]