Boost logo

Boost :

From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2002-07-26 10:13:31


"Aleksey Gurtovoy" <agurtovoy_at_[hidden]> wrote in message
news:4034600A4760D411B8720001031D84FB01096393_at_postoffice.office.meta...
> Jaap Suter wrote:
> > Another idea/problem:
> >
> > What about creating a union of all members in a typelist? Is
> > that possible?
>
> Not a C++ union. Consider using a 'variant' class :).

But of course you can build a C++ union of all types in a typlist (unless I
misunderstood the question). Unions can be templates. See the template union
ConfigurableUnion in ftp://ftp.cuj.com/pub/2002/2008/alexandr.zip.

Not that the (undiscriminated) union is as useful as it seems :o).

Andrei


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