Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2003-10-23 04:24:06


Ok, now I want to create an mpl::vector of std::vectors,
instantiated over the types in my sequence. I think this
is what I want, but I want to make sure it's the best way:

template <typename T>
struct make_vector
{
    typedef std::vector<T> type;
};

template <typename T>
struct foo
{
    typedef typename as_sequence<T>::type seq;
    typedef typename transform<seq, make_vector<_1> >::type my_vec;

    tuple<elements_of_my_vec> v;
};

foo f;

get<3>(f.v);

Obviously, my problem is making a tuple from an mpl::vector.
I sure hope this is possible and easy, because it would totally
rock if it is.

Dave

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.521 / Virus Database: 319 - Release Date: 9/23/2003

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