lundi 9 mars 2015

Confusion about Variadic Templates with Visual Studio 2010

Does Visual C++ 2010 support variadic templates or does it not?


Here is stated:



Visual C++ 2010 does not support variadic templates.



But this forum entry says:



Yes, VS2010 TR1 support variable length template arguments.



And there is also an example on MSDN that is listed as for Visual C++ 2010 explicitly. However, when I try to build it with Visual C++ 2010, I get syntax error C2059 on the "...":



template<class T1, class T2, ..., class TN>
class tuple { /* ... */ };


What am I missing? Do I need to turn on some compiler option?


Aucun commentaire:

Enregistrer un commentaire