Boost logo

Boost Users :

From: Yuval Ronen (ronen_yuval_at_[hidden])
Date: 2006-08-16 10:10:33


Lets say I have several types t1, t2, t3, and so on. Each of them has a
typedef x within it. I want to be able to get a type y, and find the
type t which holds is_same<y, t::x>. I thought of doing it using
mpl::map< pair<t1::x, t1>, pair<t2::x, t2>, ...>.

The problem is how to create the map. I can create it manually, just
like in the previous sentence, but I hope there's a better way. Is there
some transform algorithm that I can pass it an mpl::set<t1, t2, ...> and
a meta-function that yields t::x for any given t, and this algorithm
would produce the desired map?

Thanks,
Yuval


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