------- Comment #5 from jwakely dot gcc at gmail dot com 2010-01-21 10:42 ------- (In reply to comment #2) > Yes, it's a defect (a concepts hangover) - the example is invalid according to > the async spec. I pointed it out to Lawrence and he's dealing with it for the > next draft.
To expand on this: std::async is defined in terms of Fn::result_type, assuming that Concepts would provide Callable::result_type, so the example would be valid. Without concepts, that doesn't work, so the example is invalid. The most likely fix will be to use result_of<Fn(Args...)>::type instead, making the example valid again. I chose to follow the spec, not the example which appears in a non-normative note. (In reply to comment #4) > Well, using result_of / decltype would make it more usable in the meanwhile, > should not be a big deal, right? Yes, I think we could do that. I'll ask Lawrence how he's planning to address it - we might as well do that way. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42819