Boost logo

Boost Users :

From: Tarjei Knapstad (tarjeik_at_[hidden])
Date: 2003-05-30 09:35:55


On Fri, 2003-05-30 at 14:08, Tarjei Knapstad wrote:
> I tried constructing a tuple with 12 types today without much luck. I've
> read through the headers to see if there was any obvious way of getting
> around the 10 limit but couldn't find one (I half expected to find
> something along the way of vectorxx<>, in MPL).
>
> Am I being stupid, or is there really no way of constructing a tuple
> with more than 10 elements?
>
It just occured to me that I can make the 10th template argument of
tuple a "cons" list in itself, but I find this a bit awkward, i.e.

typedef cons<float, cons<int, cons<double, null_type> > > some_types;
typedef tuple<type1, type2, ..., some_types> large_tuple;

Should tuple by default allow for more than 10 types? Or at least
provide macros ala Alexandrescu's typelist construction macros?

Cheers,

--
Tarjei

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