Boost logo

Boost Users :

Subject: Re: [Boost-users] [preprocessor] one comma too many
From: Manfred Doudar (manfred.doudar_at_[hidden])
Date: 2010-05-26 07:18:26


On Wed, 26 May 2010 13:24:45 +0200
Maxime van Noppen <maxime_at_[hidden]> wrote:

> On 05/26/2010 01:08 PM, Manfred Doudar wrote:
> > However, I would like to replace "T" with the following instead:
> >
> > std::pair<T, T>
> >
> > ie: I want to write something to the effect of:
> >
> > BOOST_PP_ENUM_PARAMS(n, std::pair<T, T> r)
> >
> > Of course, BOOST_PP_ENUM_PARAMS now sees one too many arguments, and
> > errors. Any ideas on how to achieve this would be most appreciated.
> >
> >
> > With thanks in advance,
>
> Hi,
>
> You must use a typedef to hide that comma :
>
> typedef std::pair<T, T> pairTT_t;
> BOOST_PP_ENUM_PARAM(n, pairTT_t r)
>

Thank you Maxime for pointing out the obvious, I should have known
better.

Cheers,

-- 
Manfred

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net