Boost logo

Boost Users :

From: Edward Diener (eldiener_at_[hidden])
Date: 2019-10-23 21:30:05


On 10/22/2019 4:41 PM, pavel b via Boost-users wrote:
> Hi,
>
> preprocessor/config/limits.hpp limits tuple size to 64 elements.
> Changing the BOOST_PP_LIMIT_TUPLE in this file seems not to have any
> effect. Is it possible to increase the maximal tuple size?
> Are there scripts to update dependent macros like BOOST_PP_TUPLE_ELEM_*
> in preprocessor/tuple/elem.hpp?
>
> Thanks in advance

No, you should not be changing the limits and doing so will not actually
change anything. If you want more than 64 tuple elements you could have
a tuple whose elements themselves are tuples. For instance if you wanted
256 tuple elements you could program this as a tuple with 64 elements
and each of those elements is a tuple with 4 elements. Or if you like a
tuple with 16 elements and each of those elements a tuple of 16
elements. You get the idea.

My problem of changing this in Boost PP to some other greater hardcoded
limit is that preprocessing speed will slow down overall if I do so,
even for those people who do not need to use greater limits. If you feel
there is some way of providing dynamic limits, where changing some limit
value somehow changes the limit for all tuple functionality, please
provide a PR for doing so, realizing that allowing dynamic changing of
limits affects quite bit of tuple functionality in the Boost PP library
which would have to have new implementations in your PR.


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