Boost logo

Boost :

From: brianjparker (brianjparker_at_[hidden])
Date: 2002-02-19 09:58:31

--- In boost_at_y..., Eric Friedman <ebf_at_u...> wrote:
> Has there been any progress in bringing discriminated unions (aka
> variants) into Boost?
> I know Andrei Alexandrescu's paper describes how to create a variant
> type at <>, but I
> been unable to find an actual source implementation that can be used
> unchanged in a application today.
> The project I am currently working on would benefit greatly from a
> stable, well-tested discriminated union implementation, and so I am
> eager to get my hands on such an implementation. I would also be
> willing to assist in bringing the implementation up to Boost
> so that it could be submitted for formal review.

I have submitted a very simple discriminated union class in the files
section in "bjp_utilities*.zip". I have a slightly newer version on
my local machine which I will upload soon, but there are only minor

I must say, however, that I haven't personally found much use for
this class and so I would be interested if you find it useful.

Other discriminated union designs discussed on this list included
additional features such as compile-time tags to essentially
distinguish subtypes- these may be a better fit for your needs.

Brian Parker

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