|
Boost : |
Subject: [boost] [preprocessor]BOOST_PP_CHECK_2 with wrong number args
From: Larry Evans (cppljevans_at_[hidden])
Date: 2011-08-24 14:15:20
boost/preprocessor/detail/check.hpp in boost version 1.47.0 contains:
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() &&
~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC()
# define BOOST_PP_CHECK_D(x, type)
BOOST_PP_CHECK_1(BOOST_PP_CAT(BOOST_PP_CHECK_RESULT_, type x))
# define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk)
# define BOOST_PP_CHECK_2(res, _) res
# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
The above shows BOOST_PP_CHECK_2 is called with 1 argument
on rhs of BOOST_CHECK_1; yet, the arity is 2, as shown
on the next line.
This results in the errors reported here:
http://article.gmane.org/gmane.comp.lib.boost.devel/222795
when that line is changed to:
# define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk,_)
the reported error goes away; however, several other errors
occur about too many instead of too few arguments passed to
BOOST_PP_CHECK_2.
Is this a BOOST_PP bug? If not; how can the errors reported
in:
http://article.gmane.org/gmane.comp.lib.boost.devel/222795
be avoided?
TIA.
-regards,
Larry
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk