std::async fails compilation for Callable with two or more arguments. - by GhostlyGhost

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


1
0
Sign in
to vote
ID 729760 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 3/8/2012 9:18:38 AM
Access Restriction Public
Moderator Decision Sent to Engineering Team for consideration

Description

In order to call std::async() with a Callable that takes two or more arguments, only the form std::async() which takes a launch policy compiles. Using the form which does not take a launch policy fails to compile.
Sign in to post a comment.
Posted by Microsoft on 3/23/2012 at 8:11 PM
Hi,

Thanks for reporting this bug. We've fixed it, and the fix will be available in VC11.

This one was interesting because the C++11 Standard's specification for async() is actually broken, resulting in this error. There are two overloads of async(), one that takes a launch policy and one that doesn't, and while the Standard attempted to make them unambiguous, its attempt was incomplete. I changed our implementation to properly constrain the second overload.

If you have any further questions, feel free to E-mail me at stl@microsoft.com .

Stephan T. Lavavej
Visual C++ Libraries Developer
Posted by MS-Moderator09 [Feedback Moderator] on 3/8/2012 at 11:11 PM
Thank you for submitting feedback on Visual Studio 11 and .NET Framework. Your issue has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Posted by MS-Moderator01 on 3/8/2012 at 9:59 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)