Boost logo

Boost :

Subject: Re: [boost] [TTI] Review
From: Jeffrey Lee Hellrung, Jr. (jeffrey.hellrung_at_[hidden])
Date: 2011-07-12 17:45:19


On Tue, Jul 12, 2011 at 8:30 AM, Edward Diener <eldiener_at_[hidden]>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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk