Boost logo

Boost Announcement :

From: Jeff Garland (jeff_at_[hidden])
Date: 2003-03-12 06:21:45

The Variant library by Eric Friedman and Itay Maman has been accepted into boost.

I have summarized the main issues/discussion points below.

-- There was a long discussion about a better name for 'extract' and whether it
   should be a member or free function. I'm not sure this was fully agreed,
   but it seemed like the group was leaning to a free function called
   'get' patterned after the final tuple proposal to the library working

-- The interface should allow variants with a 'void' or 'empty' type.
   Also, the interface should allow variants with only a single type or possibly
   no types. provides
   the conclusion of this discussion.

-- Concern about allowing variant with const types and other requirements on
   bounded types. See

-- Concern about using std::type_info for reflection. Also in

-- Header files should be moved out of the /boost directory
   into the /boost/variant or boost/variant/detail. There should be
   a single include for everything:

   #include "boost/variant/variant.hpp"

-- Template functions in header files (e.g. swap) need to be defined inline
   to avoid multiply defined errors.

-- Several missing include files. See

-- There are several headers that extend other parts of boost
   (eg: config, mpl, type_traits) that should be incorporated
   into their appropriate boost locations.

-- One reviewer suggested that moving everything into namespace

[Requested Additions]
-- The authors should review suggestions and keep in mind possible synergies
   with the optional library. There was a fair amount of discussion on this
   point, but no final consensus on the exact form of any relationships
   between the libraries.

-- One reviewer requested the addition of an operator== which would return
   true if 2 variants have both the same type and value.

-- A couple of reviewers noted a need to distinguish Variant from Any.
   Itay provided an good explanation which should be incorporated in the
   documentation. See
   for Itay's discussion.

-- Source code for tutorial and sample programs should be provided under

-- There were many detailed documentation issues described in the detailed
   reviews cited below.

In addition to the above summary, the authors should review, evaluate,
and incorporate suggestions from the following reviewers. In particular,
the authors have not yet responded to the reviews by G. Rozental and
R. Richter.

E. Brey
G. Rozental
F. Cacciola
R. Richter (private email).

Thanks to all the reviewers.

Jeff Garland
Variant Review Manager

Boost-announce list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at