Boost logo

Boost :

From: Itay Maman (itay_maman_at_[hidden])
Date: 2002-06-12 14:48:55


Yitzhak Sapir wrote:
>>-----Original Message-----
>>From: Douglas Gregor [mailto:gregod_at_[hidden]]
>
>
>
>
> boost::any also allows an infinite range of types that may not necessarily be incomplete.
> For example, you could have a union of all types that inherit from
some common base type (Shape),
> or a union of any instantiation of a templated type
> (I wonder if it is possible to check the existence of a class as part
of a templated type
> at compile time -- perhaps using the "has member" compile time test).
>

The variant implementation relies on the ability to map concrete types
to integers. My implementation uses the index_of TypeList algorithm, for
instance.

So, unless we'll come-up with some birlliant way to do this mapping
differently, we will not be able to implement a variant whose list of
legal (concrete) types is 'open'.

-Itay


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk