[Bug libstdc++/92546] [10/11 Regression] Large increase in preprocessed file sizes in C++2a mode

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Nov 20 19:29:27 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92546

--- Comment #15 from Jonathan Wakely <redi at gcc dot gnu.org> ---
<algorithm> and <memory> got unavoidably bigger in C++20 due to the extra algos
in std::ranges.

<valarray> includes <algorithm> so is larger. We can almost certainly replace
<algorithm> with <bits/stl_algobase.h> and <bits/stl_algo.h> for <valarray>'s
purposes, it doesn't use the ranges algos.

<chrono> got a little bigger for C++20, and will grow bigger when the timezone
features are added. We should add <bits/chrono.h> with just duration,
time_point, steady_clock and system_clock, for use in <thread>, <mutex> etc.

<iterator> has all the concepts stuff, and that makes a lot of other headers
bigger. We might want to move common_iterator and counted_iterator out of
<bits/stl_iterator.h> so they're only included by <iterator> and not the bits
that <vector> etc. use.


More information about the Gcc-bugs mailing list