Boost logo

Boost :

From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2024-10-08 17:49:27


On 10/8/24 19:55, Kostas Savvidis via Boost wrote:
>> On 8 Oct 2024, at 19:14, Vinnie Falco via Boost <boost_at_[hidden]> wrote:
>>
>> Therefore the more important question becomes: what level of effort should
>> be invested in removing the dependence on obsolete libraries from the
>> non-obsolete Boost libraries which use them?
>
> There are some libraries, including but not limited to the below that contain code I would be ashamed of showing in public by 2030.
> Some of those headers are 2,3,5 MB large. The "Slow compilation" complaint might be related to those.
> Is there nothing that can be done about this in the next six years?

By default, Boost.MPL and Boost.Fusion templates are generated only up
to 50 elements. See here, for example:

https://github.com/boostorg/mpl/tree/develop/include/boost/mpl/vector/aux_/preprocessed/plain
https://github.com/boostorg/fusion/tree/develop/include/boost/fusion/container/vector/detail/cpp03/preprocessed

Furthermore, by default both Boost.MPL only use definitions of up to 20
elements (BOOST_MPL_LIMIT_VECTOR_SIZE) and Boost.Fusion - up to 10
(FUSION_MAX_VECTOR_SIZE), so only those headers are being included,
unless the user raises that limit by redefining the limit macros.

If you have headers for more than 50 elements then you (or the one who
built Boost you're using) have generated those headers. Both Boost.MPL
and Boost.Fusion provide tools for that in case someone needs more than
50 elements in a container. But again, even if you generate those
headers, they don't get included unless you actually request it by
raising the limit.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk