
On Tue, Jul 12, 2011 at 8:30 AM, Edward Diener <eldiener@tropicsoft.com>wrote: [...]
There is no reason to prefer replacing '<' and '>' in the syntax for the template parameters with '(' and ')' other than to complicate matters unnecessarily.
That, of course, is not entirely true; it's an alternative to replacing only commas with ")(", which makes things unnatural to read. After thinking about this last night I have decided to use a pp-array
instead of a pp-seq as the extended syntax for the non-variadic version and as an alternate syntax for the variadic version. So the syntaxes for TTI_TEMPLATE,
using 'template<class,class,class> struct xxx' and using 'template<class,int,template<**class,class> > struct yyy' are:
TTI_TEMPLATE(xxx,BOOST_PP_NIL) // (1) non-variadic only TTI_TEMPLATE(xxx) // (2) variadic only TTI_TEMPLATE(yyy,(3,(class,**int,template<class,class>))) // (3) both
[...] Isn't the above a size 4 Boost.PP Array? Or are you purposely demonstrating the ease with which the user would make mistakes with this syntax? :) - Jeff