Boost logo

Boost :

From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2002-06-13 10:13:22

"Douglas Gregor" <gregod_at_[hidden]> wrote in message
> On Thursday 13 June 2002 02:18 am, Andrei Alexandrescu wrote:
> > What I also believe, in contradiction with some participants, is
> > Variant should use typelists.
> For the interface or just the implementation? I don't see how we
could avoid
> typelists in the implementation, but we don't need them in the
interface. We
> have a choice between:
> template<typename T1, typename T2 = unused2, ..., typename TN =
> 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.

Otherwise, one would have to maintain two separate lists of types, one
in the typelist and the other in the Variant instantiation.


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