Preprocessor Metaprogramming Problem
16 Nov
2003
16 Nov
'03
7 a.m.
I'm trying to figure out the longest sequence in a sequence. Here's the MACRO I tried. #define OP(size, state, elem) BOOST_PP_MAX(state, BOOST_PP_SEQ_SIZE(elem)) #define MACRO(seq) BOOST_PP_SEQ_FOLD_LEFT(OP, 0, seq) If I process ((a)(b))((c)) I get 2 back as expected. However, the extra parenthesis seems awkward. I'd like to process ((a)(b))(c) instead, but can't. The '(c)' gets coverted to plain 'c' as the elem parameter to OP and that's not a valid sequence. Any ideas? Mitch
7682
Age (days ago)
7682
Last active (days ago)
0 comments
1 participants
participants (1)
-
Mitch