$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: nee Spangenberg (dsp_at_[hidden])
Date: 2004-01-14 10:12:55
Hi boosters,
I am just doing first steps in using the boost::mpl library, which is
really great.
Obviously due to my ignorance of knowing it not better, I tried the
following:
#include <boost/mpl/vector.hpp>
#include <boost/mpl/size.hpp>
#include <boost/mpl/void.hpp>
#include <boost/tuple/tuple.hpp>
template<
typename T0 = boost::mpl::void_, typename T1 = boost::mpl::void_,
typename T2 = boost::mpl::void_, typename T3 = boost::mpl::void_,
typename T4 = boost::mpl::void_, typename T5 = boost::mpl::void_,
typename T6 = boost::mpl::void_, typename T7 = boost::mpl::void_,
typename T8 = boost::mpl::void_, typename T9 = boost::mpl::void_
>
class Test
{
typedef boost::mpl::vector<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>
InternalTypeContainer;
typedef boost::tuples::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>
Tuples; // Fragile code!!
Tuples m_Tuple;
};
typedef Test<double, char, bool> MyTypes;
As you will belief, that will not compile successfully, because
boost::mpl::void_ is
an undefined type (similar to void) and I am trying to fill my tuple
partially with undefined
types. So my problem is:
Does there exist a boost::mpl way (?) to define my
boost::tuples::tuple<> inside the given
Test class template until the last non-mpl::void_ is filled into it?
(Iteration until end??)
Or does their exist another tuple class, which I should try to use at
this place?
Shamefully I have to confess that I have to cope with the VC6 compiler
here....
Thank you very much for your ideas,
Daniel