Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-02-16 09:52:46

"Max Motovilov" <max_at_[hidden]> writes:

> I may have posted something to this effect in Apr. 2003 but got no
> response if I have; just thought I might have better luck the second time as
> there
> were no changes to the tuple library since then.
> Proposal: current boost/tuple library has a hardcoded limit on the tuple
> arity (10 elements). Some applications may require substantially larger
> tuples even at a cost of extended compilation time. Using boost/preprocessor
> library, it is relatively easy to rewrite the tuple code in such a way that
> arity limit will depend on a single configuration macro without incuring any
> other changes to the library. No additional cost will be imposed on the
> users who are satisifed with the current tuple library.
> I have a working implementation of such configurable tuples that I've been
> using since Apr. 2003. As I had no need to support C++ compilers that do not
> implement partial specification, I have only converted
> boost/tuple/detail/tuple_basic.hpp so far. Arity limit is controlled by the
> BOOST_TUPLE_MAX_ARITY macro which is defaulted to 10 inside tuple_basic.hpp
> if it is not defined prior to its inclusion. Since I am not sure what
> procedure should I follow to submit such a modification to an existing Boost
> library, I decided just to post the proposal here and provide a link to the
> modifed file:

The existing tuple implementation is scheduled to be replaced in
Boost 1.32.0 by Joel de Guzman's "Fusion" library. See

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at