This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/42819] [C++0x] std::async fails to compile with simple tests, including N3000 example
- From: "jwakely dot gcc at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jan 2010 16:14:53 -0000
- Subject: [Bug libstdc++/42819] [C++0x] std::async fails to compile with simple tests, including N3000 example
- References: <bug-42819-6477@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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