Boost logo

Boost Users :

Subject: Re: [Boost-users] [Preprocessor] Questiona bout reentrant call and file iteration performance
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-02-15 10:41:08


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net