From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2005-06-14 16:31:20
Paul Mensonides wrote:
>>[mailto:boost-bounces_at_[hidden]] On Behalf Of Tobias Schwinger
>>>>Only counting "real" parameters here allows us to build
>>such a cascade
>>>>for arities ranging from zero to "OUR_MAX_ARITY_LIMIT"
>>>>to deal with the two special cases that there are no nullary member
>>>>functions and that we need to go up to OUR_ARITY_LIMIT+1 for member
>>>>function invocations if the context reference is taken into account.
>>>Okay, I've dealt with that issue. But it's a (really) minor one.
>>>Generating these things with the preprocessor should
>>usually be done
>>>with vertical repetition (you'll get lousy compile times and no
>>>debuggability otherwise), which makes that sort of iteration bounds
>>This sounds like using two (slow preprocessor-) loops in
>>client code for members and non-members, where using one
>>would be appropriate...
>>I agree it can be "minor", but I currently fail to see it's
>>"less minor" than your complaint in the first place.
>>I'm having some trouble understanding the second part of the
>>What could "otherwise" possibly refer to in this context ?
>>And isn't vertical repetition the slowest form of PP
>>repetition there is ? Can you perhaps help me with it ?
> Actually, on slow preprocessors vertical repetition is *significantly* faster.
> The only problem is that you cannot entirely encapsulate it in a single macro.
Interesting (depsite the #include)! I like to hear that, since I use it a lot...
> If you show me what you want to generate, I can help you with this.
Well, this was about "what would be helpful in case X"-design-consideration.
However, if you have some (perhaps general) tips for me on how to speed up or
enhance my preprocessing code it would be great! The BOOST_FT_UNROLL routine at
the bottom of this [ http://tinyurl.com/d4964 ] file is the heart of any
preprocessing code in the library, in case you want to take a look.
I just use and trust your library - most of its inside is still pretty much
black magic to me so the code may be naive (just so you're warned)...
Thanks for offering your help!
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk