Emulation of variadic templates in C++11 standard library does not work - by cooky451

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.

Sign in
to vote
ID 730454 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 3/11/2012 9:21:52 AM
Access Restriction Public
Moderator Decision Sent to Engineering Team for consideration


Good day,

I'm currently testing Visual Studio 11 Beta. (Which is great by the way.)
The emulation of variadic templates in the library doesn't work. An example would be using std::async() with a function that takes more than one argument. (As shown below.)
But this seems to concern all function which try to emulate variadic templates. The _VARIADIC_EXPAND_0X macro is probably broken.
Sign in to post a comment.
Posted by shaul_ei on 4/12/2013 at 11:31 AM
Still does not compile with:
Microsoft Visual Studio Express 2012 for Windows Desktop
Version 11.0.60315.01 Update 2
Microsoft .NET Framework
Version 4.5.50709
Installed Version: Desktop Express

Please supply workaround
Posted by miro_andel on 9/25/2012 at 4:59 AM
Hi, still doesn't work in visual studio express 2012 for windows desktop. I'm getting these errors:

Error    1    error C2064: term does not evaluate to a function taking 3 arguments    C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xrefwrap    431    1    sgct32
Error    2    error C2064: term does not evaluate to a function taking 1 arguments    C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xrefwrap    431    1    sgct32
Error    3    error C2064: term does not evaluate to a function taking 0 arguments    C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xrefwrap    431    1    sgct32

Is there any workaround?

Kind regards,

Posted by Microsoft on 3/23/2012 at 8:08 PM

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. (It didn't have anything to do with our "faux variadic template" machinery.) 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 other 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-Moderator10 [Feedback Moderator] on 3/12/2012 at 1:37 AM
Thank you for reporting the issue.
We are routing this issue to the appropriate group within the Visual Studio Product Team for triage and resolution.These specialized experts will follow-up with your issue.
Posted by MS-Moderator01 on 3/11/2012 at 6:12 PM
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)