On 27/02/20 19:30 +0100, François Dumont wrote:
When I use std::is_permutation in hashtable_policy.h I included
stl_algo.h which is a large header. No other header in include/bits
does this, I would prefer not being the first to do such a thing.
As it is a recent change I prefer to submit this patch now.
Git commit message:
libstdc++ Hashtable: Move std::is_permutation to limit includes
* include/bits/stl_algo.h (__find_if, __count_if,
std::is_permutation): Move...
* include/bits/stl_algobase.h: ...here.
* include/bits/hashtable_policy.h: Remove <bits/stl_algo.h> include.
testsuite/23_containers/unordered* tested under Linux x86_64, I'll run
full before any commit.
Ok to commit now ?
Ok to commit once back in stage 1 ?
I was already thinking of doing something like this in stage 1. But
you're right that this is a recent regression on master. Before
<bits/stl_algo.h> got added the preprocessed size of <unordered_map>
had got much smaller due to <array> no longer including <stdexcept>.
But including <bits/stl_algo.h> made it almost the same size as in
gcc-9 again.
With your patch we remove 7kloc from <unordered_map> again.
OK for master now, thanks.