Boost logo

Boost :

Subject: [boost] generate tuples by mpl -- should I use fusion?
From: Peter Foelsche (peter_foelsche_at_[hidden])
Date: 2010-01-07 21:02:52


I need to be able to convert a mpl sequence into something like a tuple:

typedef boost::mpl::vector<double> CMplSequence;
typedef CCreateVectorFromMpl<CMplSequence>::type CVector;

I need to have runtime access with constant index:

CVector s;

get<0>(s) = 1.0;

std::cout << get<0>(s) << "\n";

I need to be able to retrieve the type at compile time -- preferably as a
mpl sequence.

I already wrote something like this using std::pair as the tuple but I'm
running into problems storing reference types on Windows.

Peter


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