
11 Apr
2010
11 Apr
'10
10:38 p.m.
On Sun, Apr 4, 2010 at 11:06 AM, Lorenzo Caminiti <lorcaminiti@gmail.com> 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