
8 Jan
2010
8 Jan
'10
2 a.m.
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: typedef CGetType<CVector, boost::mpl::long_<0> >::type CFirstType; I already wrote something like this using std::pair as the tuple but I'm running into problems storing reference types on Windows. Peter