$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [preprocessor] BOOST_PP_IS_UNARY()
From: Lorenzo Caminiti (lorcaminiti_at_[hidden])
Date: 2010-04-11 18:38:28
On Sun, Apr 4, 2010 at 11:06 AM, Lorenzo Caminiti <lorcaminiti_at_[hidden]> wrote:
> Do you know what are the drawbacks of using BOOST_PP_IS_UNARY()? If
> you have used it, what is your experience with its portability?
Can at least the authors/maintainers of Boost.Preprocessor,
Boost.Spirit, and Boost.Typeof reply based on their experience using
BOOST_PP_IS_UNARY()?
Is it OK to use BOOST_PP_UNARY() as follow?
#define PUBLIC_public (1)
#define IS_PUBLIC(token) BOOST_PP_IS_UNARY(BOOST_PP_CAT(PUBLIC_, token))
IS_PUBLIC(public) // Expand to 1.
IS_PUBLIC(xyz) // Expand to 0.
This does work just fine on both GCC and MSVC.
Thank you very much.
Lorenzo