Boost logo

Boost :

Subject: Re: [boost] [TTI] Review
From: Vicente Botet (vicente.botet_at_[hidden])
Date: 2011-07-12 00:08:48

Joel falcou-4 wrote:
> On 10/07/11 22:59, Edward Diener wrote:
>> I will look into this. It is obviously more difficult programming with
>> the latter than the former, but it is probably doable although with much
>> effort. It may not be worth the effort.
>> What the former syntax reflects is an exact transcription of the
>> template parameters with each comma replaced by ')(' and a starting and
>> ending parentheses. So for the template:
>> 'template <class,class,int,class,template <class> class
>> InnerTemplate,class,long> struct ManyParameters { }'
>> the parameters are:
>> '(class)(class)(int)(class)(template <class> class
>> InnerTemplate)(class)(long)'
>> and all I had to do as an end-user was copy the template parameters, add
>> a '(' at the beginning, add a ')' at the end, and change every ',' to a
>> ')('. As a programmer I take the sequence and directly convert it to the
>> template parameters via a BOOST_PP_SEQ_ENUM.
> Dunno if it helps but nt2 has a NT2_STRIP macro adapted from a amcro
> pasoted by Steven Watanabe that conditionnally remove parens around
> symbols. You can then pass parameters containing comma to the
> preprocessor this way :
> FOO( (template<class T, class U> struct foo) )
> and this way if no comma is involved
> FOO( struct bar )
> THe cod eis available under Boost licensing and can be incorporated w/e
> your need.


if the Joel proposal works for variadic anon variadic preprocessors it
should retained by the library. It is much more clear than any other syntax,
as follows the C++ one.


View this message in context:
Sent from the Boost - Dev mailing list archive at

Boost list run by bdawes at, gregod at, cpdaniel at, john at