
18 Jul
2005
18 Jul
'05
7:16 p.m.
BOOST_PP_SEQ_ENUM is failing for me when invoked from another macro; When the argument is (A0) I get BOOST_PP_SEQ_ENUM_2 and when the argument is (A0)(A1) I get BOOST_PP_SEQ_ENUM_4 I think what happens is that CW "sees through" the outer set of parens in # define BOOST_PP_SEQ_ENUM(seq) BOOST_PP_CAT(BOOST_PP_SEQ_ENUM_, BOOST_PP_SEQ_SIZE(seq)) seq and pastes seq to itself, yielding a length of 4 instead of 2. Here's a workaround: # define BOOST_PP_SEQ_ENUM_I(size,seq) BOOST_PP_CAT(BOOST_PP_SEQ_ENUM_, size) seq # define BOOST_PP_SEQ_ENUM(seq) BOOST_PARAMETER_SEQ_ENUM_I(BOOST_PP_SEQ_SIZE(seq), seq) I hope this is useful. -- Dave Abrahams Boost Consulting www.boost-consulting.com
7272
Age (days ago)
7272
Last active (days ago)
0 comments
1 participants
participants (1)
-
David Abrahams