[boost] Re: Variant Library: visitation algorithm

2003-04-05 Thread Eric Friedman
Gennadiy Rozental wrote: > 1. There is "theoretical" limits for the size of MPL sequences. See MPL docs > (BOOST_MPL_LIMIT_LIST_SIZE for list) > 2. You could limit variant support only for lists that does not exceed your > own limit BOOST_VARIANT_LIMIT_TYPES. Not true. There is absolutely no limit

[boost] Re: Variant Library: visitation algorithm

2003-04-04 Thread Gennadiy Rozental
> > case MAX_WITCH: > >visitor( Typelist[MAX_WITCH](storage) ); > >break; > > } > > } > > Your pseudo-code is misleading. There is no "MAX_WHICH" available to the > preprocessor when MPL-sequences are given because there is no theoretical > upper limit on the siz

[boost] Re: Variant Library: visitation algorithm

2003-04-04 Thread Eric Friedman
Gennadiy Rozental wrote: > "Eric Friedman" <[EMAIL PROTECTED]> wrote: [snip] > > If variant is given types as a MPL-sequence (e.g., variant< mpl::list > T2, ..., TN> instead of variant), then technique you > > propose will not work. Please prove me incorrect, but I don't think you > > can. > > (Not

[boost] Re: Variant Library: visitation algorithm

2003-04-04 Thread Gennadiy Rozental
"Eric Friedman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Gennadiy Rozental wrote: > > > While I do agree O(1) is better than O(N), I would like to point out > that > > > it is usable only when the pseudo-variadic template interface is used > (i.e., > > > variant as opposed to

[boost] Re: Variant Library: visitation algorithm

2003-04-03 Thread Eric Friedman
Gennadiy Rozental wrote: > > While I do agree O(1) is better than O(N), I would like to point out that > > it is usable only when the pseudo-variadic template interface is used (i.e., > > variant as opposed to variant). > > Why? And to be absolutely clear: what do you mean by "it"? By "it" I mean

[boost] Re: Variant Library: visitation algorithm

2003-04-03 Thread Gennadiy Rozental
> While I do agree O(1) is better than O(N), I would like to point out that it > is usable only when the pseudo-variadic template interface is used (i.e., > variant as opposed to variant). Why? And to be absolutely clear: what do you mean by "it"? > Also, I am still not convinced that an unrolled

[boost] Re: Variant Library: visitation algorithm

2003-04-02 Thread Eric Friedman
Gennadiy Rozental wrote: > > > 8. Visitation algorithm > > > In sketch presented visitation algorithm look like this: > > > > > > void foo1( which, visitor ) > > > { > > > if( n = 1 ) > > >visitor(...) > > >else > > > foo2( which, visitor ); > > > } > > > > > > void foo2( whic