[Preprocessor] Questiona bout reentrant call and file iteration performance
I've been playing with Boost PreProcessor for some times now and it really helped. Two corners still looks obscure for me as the doc doesn't provide clear-cut enough use-cases for my taste. 1/ Concerning the _D version of some macro, what's their use case ? I can see the example in the doc but I can't see why useing the normal version of the _D function should fail or behave badly 2/ Concerning file iteration vs BOOST_PP_REPEAT, what's the trade-off of one vs the other ? Is iterating faster at compile time than REPEATing ? Is there features of iteration that can't be done using REPEAT (or the reverse) or is the only bonus of ITERATE the fact that error actually send you in code and not on macro call site ? Thanks in advance -- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35
AMDG Joel Falcou wrote:
I've been playing with Boost PreProcessor for some times now and it really helped. Two corners still looks obscure for me as the doc doesn't provide clear-cut enough use-cases for my taste.
1/ Concerning the _D version of some macro, what's their use case ? I can see the example in the doc but I can't see why useing the normal version of the _D function should fail or behave badly
It's an optimization, just like _Z and _R. The version without the _D has to deduce the value for itself.
2/ Concerning file iteration vs BOOST_PP_REPEAT, what's the trade-off of one vs the other ? Is iterating faster at compile time than REPEATing ? Is there features of iteration that can't be done using REPEAT (or the reverse) or is the only bonus of ITERATE the fact that error actually send you in code and not on macro call site ?
Debugabillity is the main benefit. Also, BOOST_PP_REPEAT is more likely to reach preprocessor limits. In Christ, Steven Watanabe
participants (2)
-
Joel Falcou
-
Steven Watanabe