Boost logo

Boost :

From: Bradley Smith (boost_at_[hidden])
Date: 2006-01-16 08:10:46


Thanks Paul,

So are you saying that the preprocessor should look at
BOOST_PP_REPEAT_FROM_TO and begin expanding that first, in isolation
from what follows next on the line i.e. the parameters that are to be
passed to whatever BOOST_PP_REPEAT_FROM_TO "returns", and then reset the
macro replacement stack before continuing? That would explain a lot. It
would also explain why even if I modify the other code to this:

#define CONCAT_1(a, b) CONCAT_1_D(a, b)
#define CONCAT_1_D(a, b) a ## b
#define CONCAT_2(a, b) CONCAT_2_D(a, b)
#define CONCAT_2_D(a, b) a ## b
#define AB(c, x, y) CONCAT_ ## c(x,y)
#define CONCAT CONCAT_1

CONCAT(A, B(1, p, q)) // Not calling CONCAT_1 directly any more

Expansion still stops early because after expanding CONCAT (which is not
a function macro this time) and deleting the replacement stack we are
still kicking the next lot of expansion off with CONCAT_1, so we cannot
expand it again?

Thanks for your time Paul. I tried responding personally but your mail
server considers me to be a spammer ;-)

Brad


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk