Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2003-03-09 23:53:52


All --

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

I have summarized the main issues/discussion points below.

[Interface/Design]
-- 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
   group.

-- 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. http://aspn.activestate.com/ASPN/Mail/Message/1547755 provides
   the conclusion of this discussion.

-- Concern about allowing variant with const types and other requirements on
   bounded types. See http://aspn.activestate.com/ASPN/Mail/Message/1558173

-- Concern about using std::type_info for reflection. Also in
   http://aspn.activestate.com/ASPN/Mail/Message/1558173

[Implementation]
-- 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
   http://aspn.activestate.com/ASPN/Mail/Message/1558173

-- 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
   boost::variant.

[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.

[Documentation]
-- 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 http://aspn.activestate.com/ASPN/Mail/Message/1541597
   for Itay's discussion.

-- Source code for tutorial and sample programs should be provided under
   libs/variant/examples.

-- 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 http://aspn.activestate.com/ASPN/Mail/Message/1539095
G. Rozental http://aspn.activestate.com/ASPN/Mail/Message/1558173
F. Cacciola http://aspn.activestate.com/ASPN/Mail/Message/1541664
R. Richter (private email).

Thanks to all the reviewers.

Jeff Garland
Variant Review Manager


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