Boost logo

Boost Users :

From: Brian Simpson (yg-boost-users_at_[hidden])
Date: 2003-07-11 15:55:07


Here is the problem:
A tuple or variant needs to be defined, whose types are derived from an
mpl::list (or other model of MPL Sequence). How is it to be done?

I have considered that I might be able to define the tuple/variant with the
types and then generate the sequence from there, but that still leaves me
wondering how to define another tuple/variant with a sub- or super-set of
the types in the generated sequence.

Consider that I am supplied with a sequence of types, and that I want to
define either
1)a tuple of pointers to them, or
2)a variant based on those types as well as pointers to them.

I have considered that it would be a good thing to provide sequence-based
tuples/variants and still provide the current variadic template (<--is that
the correct term?) versions--which could be implemented in terms of the
sequence-based ones (in my uneducated opinion). But I wonder if there is
another solution already available which I have not considered.

TIA for your consideration,
Brian


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net