On 06/12/13 04:54, Igor R wrote:
I probably jumped to the conclusion that "template argument number" meant "number of template instantiations". Sorry for that mistake. I guess "template argument number" means the maximum arity of any template. IOW, if "template argument number" was 5, then any template taking over 5 arguments would cause the MSVC10/11 compiler to diagnose an error. IOW:
tuple
would be OK, but:
tuple
would cause MSV10/11 to issue a compiler error. Is that right?
Yes, right.
Also, I also read somewhere that MSVC had not yet implemented variadic templates:
Variadic templates are implemented in the updated MSVC 11 toolchain ("Microsoft Visual C++ Compiler Nov 2012 CTP"). http://www.microsoft.com/en-us/download/details.aspx?id=35515
Thanks for the link.
Now with variadic templates, can a tuple with > 64 elements be
created? IOW, would the following:
template
tuple_t; int run(tuple_t const&a_tuple) { int sum=0; sum+=slim::at_c< 0 >(a_tuple).value; sum+=slim::at_c< 1 >(a_tuple).value; sum+=slim::at_c< 2 >(a_tuple).value; sum+=slim::at_c< 3 >(a_tuple).value; . . . sum+=slim::at_c< 49 >(a_tuple).value; return sum; } and was generated by the attached python file with TUPLE_SIZE as the argument. -regards, Larry