C++ Variadic Templates Fail to Compile VS2012 - by Dan W Hollingsworth

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<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 747001 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 6/6/2012 8:59:38 AM
Access Restriction Public


Variadic templates fail to compile.

This very simple repro:

(62)	template<typename ... Ts>
(63)	void InvokeThem(const Ts&... vs)
(64)	{
(65)	}

Generates these very annoying errors:

     1> ... (62): error C2143: syntax error : missing ',' before '...'
     1> ... (63): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
     1> ... (63): error C2143: syntax error : missing ',' before '&'

Related issue: https://connect.microsoft.com/VisualStudio/feedback/details/625582/c-0x-variadic-templates-fail-to-compile

This is of course inconsistant with what is expected, and in fact this code is taken directly from Andrei Alexandrescu's Going Native 2012 presentation. "Variadic Templates are Funadic". 5 minutes and 3 seconds into this video : http://channel9.msdn.com/Events/GoingNative/GoingNative-2012/Variadic-Templates-are-Funadic

Can we get this fixed now?

Sign in to post a comment.
Posted by Rajamohan Adittan on 7/25/2012 at 4:53 PM
We tried this feature in VS2012 RC, the result is same. I have projects to run across platforms. GCC 4.4 and above support this feature. Let me know in which major release you will include this feature?
Posted by Zachary Northrup MSFT on 6/19/2012 at 3:29 PM
Just to clarify, does that mean that it will be in before the final (major) release of VS11? Or are you saying stay tuned another couple of years for VS12?
Posted by Ulzii [MSFT] on 6/7/2012 at 10:33 AM

We don't have support for Variadic Templates in VS11 yet. Please stay tuned for next major releases to have this support.

Ulzii Luvsanbat
Visual C++ Team
Posted by Bin [MSFT] on 6/6/2012 at 10:59 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 Macy [MSFT] on 6/6/2012 at 9:50 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)