Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2003-04-07 01:13:29

"Eric Friedman" <ebf_at_[hidden]> wrote in message
> Gennadiy Rozental wrote:
> > 1. There is "theoretical" limits for the size of MPL sequences. See MPL
> docs
> > 2. You could limit variant support only for lists that does not exceed
> your
> Not true. There is absolutely no limit on the size of a type-sequence
> than memory available to compiler, etc.).

Yes. You right. It's not hard limit. They both present *reasonable* limits.
You may choose some other third resonable limit for the number types you
support. I do not see any practiacal situation where one would want to
instantiate boost::variant with more then 1024 types. And ifyou want to
support even bigger numbers you could select the implementation of the
visitation algorithm by some PP flag.

> > 3. You could choose/define any other arbitrary limit (it should probably
> > exceed limits mentioned in items 1 and 2)
> I just think this is a bad idea. Loop-unrolling would provide O(1)
> complexity for some implementation-defined number of types and would not
> place any arbitrary limits on the user.

Could you clarify in which case loop-unrolling would provide O(1)


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