From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2002-07-26 22:10:29
Andrei Alexandrescu wrote:
> > 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.
Sure, but you cannot inherit them (the usual way to get several members into
a single class).
> See the template union ConfigurableUnion in
Oh, I see. But it's not a union, it's a union of union of union etc.; e.g.
for the type sequence [int, long, char, double] you code will produce
I am not sure of the implications, though :). Anyway, it's good to know,
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk