Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2005-01-04 17:21:03


On 01/04/2005 11:52 AM, christopher diggins wrote:
[snip]
> The advantages (and my motivation for creating it) of the union-list is
> that it requires no other boost libraries and has a very tiny code base.
> Another difference ( but not neccessarily an advantage ) of the
> union-list is that it uses and provides an index to access the type of
> its contents.
These same advantages (AFAICT) are provided by the code reference by:

   http://thread.gmane.org/gmane.comp.lib.boost.devel/115072

More specifically, by the sum.hpp code. In addition, that code
shares almost the same code with product.hpp and doesn't use any
extra memory. I'm still developing the code and the successors
are in the same indexed_types directory in files:

   composite_sum
   composite_product

However, as you can see by the above thread, there's some question
about the advantages vs. the existing boost tuple and variant types.
So for, I can't see how there could be since the memory is minimal
and access time (AFAICT) can't be much faster since accesses are simply
done by directly naming the supertype (via the Index template
argument) containing the required tuple or variant member.

My understanding is that Joel will answer the question when he has
the time.


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