Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2008-08-25 08:33:59


Markus Werle wrote:
> Then it would be very nice if the standard defined a MACRO allowing
> me to determine the maximum number of tuple elements.
> Otherwise this renders tr1::tuple completely useless for any template
> code.

Really? I've never actually needed more than about 3 elements myself. In
any case the next std will have variadic template support which will allow
for an infinite (ish) number of arguments to std::tuple.

>> So you can't change it, or portably store more than 10 elements. Of
>> course if you just happen to be using the Boost implementation then
>> all the Boost.Fusion macros and extensions kick in, but you can't
>> guarentee that: to take one example VC9+sp1 supplies it's own TR1
>> tuple so that's what Boost.TR1 pulls in (out of necessity).
>
> Yes. I was aiming at getting std::portable ...
> These "implementation defined" clauses suck (not only IMHO).
> It is like those "maximum nesting level of 18 in templates" that
> hinders portability for RealWorld apps.
>
> Thinking about variadic template arguments while releasing a TR that
> clings to fixed numbers seems odd to me ...

The TR is aimed at *existing* compilers, it introduces no language changes,
the next std will have a tuple with variadic argument support.

HTH, John.


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