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++/42819] [C++0x] std::async fails to compile with simple tests, including N3000 example



------- Comment #12 from jwakely dot gcc at gmail dot com  2010-01-21 16:14 -------
Aha - I see what's happening.

As well as changing _Fn:result_type everywhere please change line 1327 in
<future> to this:

    return async<_Fn, _Args...>(launch::any, std::forward<_Fn>(__fn),

The problem is the wrong overload of async() is being selected, and it is
trying to use launch::any as the functor, which gives the "cannot be used as a
function" error.

Paolo, this is the problem I had with std::bind, I think there might be a
larger problem with overloaded variadic template functions ... I'll think about
it further.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42819


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