Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2002-06-13 11:02:24

"Andrei Alexandrescu" <andrewalex_at_[hidden]> wrote in message
> "Douglas Gregor" <gregod_at_[hidden]> wrote in message
> > [...]
> > template<typename T1, typename T2 = unused2, ...,
> > typename TN = unused3>
> > class variant;
> >
> > and
> >
> > template<typename Types>
> > class variant;
> For the interface AND the implementation. When developing an
> application, one might put a collection of types in a typedef of a
> typelist. Then, that type definition can be used in many parts of the
> application, and in particular can be passed to the Variant as well.
> [...]

Maybe this is overkill, but would it be possible to support *both*
interfaces? Is there some compile-time magic that would allow the
variant class to detect if the first argument were a typelist, and handle
that appropriately? I can see that typelists are essential for
metaprogramming, but I like the convenience of the non-typelist


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