Boost logo

Boost :

Subject: Re: [boost] [vmd] Library Review
From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2014-09-14 22:34:49

On 9/14/2014 5:12 PM, Edward Diener wrote:
> On 9/14/2014 6:49 PM, Paul Mensonides wrote:

>> The BOOST_PP_AUTO_REC macro is used to find the first macro of a set of
>> macros which has not been painted (i.e. will expand). It requires a set
>> of macros which are a power of 2 which are used in order.
> Here is my understanding of what BOOST_PP_AUTO_REC does from your
> example. It takes a function-like macro name and a parameter which is a
> Boost PP number which is a power of 2, from a minimum of 2 to a maximum
> of 256. It then calls the function-like macro name passing a number
> starting with 1 through the number passed to it. If the function-like
> macro returns 1 it stops and returns the current number else it
> continues with the next number. I won't ask what BOOST_PP_AUTO_REC
> returns if its function-like macro never returns 1 before it finishes
> cycling through its numbers <g>.

Yes, except that it does a binary rather than linear search, so it can
search a fairly large set with minimal invocations of the predicate.

>> The alternate registration mechanism (excluding the comma in the
>> registration itself) that you guys realized is good and is obvious is
>> retrospect. That would make the registration much cleaner.
> I agree. Your proposal is obvious in retrospect but it is like the
> legendary story of Christopher Columbus and the egg.
> I am now very glad I can make a v-sequence much easier with better
> functionality. Why I didn't think of your solution to being with ... <g>.

Sorry, I meant excluding the comma in the registration was obvious to me
in retrospect, but I didn't think of it at the time.

I think that removing the existing length (etc.) limitations on
v-sequences will make things much more usable--and make the
documentation much much simpler.

Paul Mensonides

Boost list run by bdawes at, gregod at, cpdaniel at, john at