Boost logo

Boost :

Subject: Re: [boost] [preprocessor] [variadic] BOOST_PP_VARIADICS vs BOOST_NO_VARIADIC_MACROS
From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2011-12-18 10:18:40


On Sat, 17 Dec 2011 12:45:26 -0800, lcaminiti wrote:

> Hello all,
>
> Why does Boost.Preprocessor redefines BOOST_PP_VARIAIDCS instead of just
> using BOOST_NO_VARIADIC_MACROS from Boost.Config?

The pp-lib requires more than just superficial variadic macro support.
I.e. BOOST_PP_VARIADICS macro is stronger.

> Furthermore, GCC supports variadics also when C++11 extensions are not
> enabled so I think the following should not &&
> __GXX_EXPERIMENTAL_CXX0X__:
>
> // File: boost/preprocessor/config/config.hpp # /* Wave (C/C++), GCC
> (C++) */
> # elif defined __WAVE__ && __WAVE_HAS_VARIADICS__ || defined __GNUC__
> && __GXX_EXPERIMENTAL_CXX0X__
> # define BOOST_PP_VARIADICS 1

Because it isn't standard C++98. It can be enabled via a command line
definition of BOOST_PP_VARIADICS. It is enabled by default (on GCC) when
in C++11 mode. I believe that GCC 4.7 actually finally defines __cplusplus
correctly as well.

-Paul


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