Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-03-04 18:13:37


"Daniel Wallin" <dalwan01_at_[hidden]> wrote in message
news:4047B47D.9010304_at_student.umu.se...
> Jonathan Turkanis wrote:

> >
> > I get the following warnings:
> >
> > warning C4003: not enough actual parameters for macro
> > 'BOOST_PP_IIF'
> > warning C4003: not enough actual parameters for macro
> > 'BOOST_PP_IIF_I'
> > warning C4003: not enough actual parameters for macro
> > 'BOOST_PP_IIF_0'
> >

<snip>

> BOOST_PP_EMPTY() evaluates to nothing, so I would think that VC6 is
> actually right. I'm probably wrong though, I'm no PP guru. ;)
Anyway, I
> think you should do:
>
> #define PARAM(has_param) BOOST_PP_IF( \
> has_param \
> , BOOST_PP_IDENTITY(typename Param) \
> , BOOST_PP_EMPTY)()
>

Yes, that's better. It's hard to believe that VC6 could be the only
conforming preprocessor on this point. though ;-)

Thanks.

Jonathan


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