Boost logo

Boost Users :

From: Ares Lagae (ares.lagae_at_[hidden])
Date: 2007-05-09 12:12:12


David Klein wrote:

> Boost.Tuple (http://boost.org/libs/tuple/doc/tuple_users_guide.html).

Boost.Tuple is close to what I want. However, I want to access based on type
rather than index. E.g. I when I have a typelist

typedef boost::mpl::vector<int, float>

I want to generate a kind of tuple from the typelist that contains variables
that can be accessed using tuple.get<int>() and tuple.get<float>(). (Note
that I do not want a union.)

I also need the ability to, given two typelists

typedef boost::mpl::vector<int, long> types;
typedef boost::mpl::vector<float, double> types;

want to declare member variables with type e.g. "std::pair<int, float>",
"std::pair<int, double>", "std::pair<long, float>", "std::pair<long,
double>".

> Boost.Fusion (only in CVS)

I will have a look at the Fusion library.

--
Ares Lagae
Computer Graphics Research Group, Katholieke Universiteit Leuven
http://www.cs.kuleuven.be/~ares/

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