diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2020-02-17 15:25:33 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2020-02-17 15:43:43 +0000 |
commit | 9cd4eeefcc641dd70d026e08e9d218101b826c52 (patch) | |
tree | 56fbd7edf0607751c80663be94d29d83e0217fd0 /gcc/tree-ssa.c | |
parent | c03b53da9129ae2d5ac9629c4b874d0981a7d418 (diff) | |
download | gcc-9cd4eeefcc641dd70d026e08e9d218101b826c52.zip gcc-9cd4eeefcc641dd70d026e08e9d218101b826c52.tar.gz gcc-9cd4eeefcc641dd70d026e08e9d218101b826c52.tar.bz2 |
libstdc++: Reduce header dependencies for C++20 (PR 92546)
In C++20 <memory> depends on <bits/ranges_unitialized.h> which
depends on <bits/random.h> just for a single concept. Including
<bits/random.h> also requires including <cmath>, which is huge due to
the C++17 special functions.
This change moves the concept to the <bits/uniform_int_dist.h> internal
header that exists so that <bits/stl_algobase.h> doesn't need to include
<bits/random.h>.
PR libstdc++/92546 (partial)
* include/bits/random.h (uniform_random_bit_generator): Move definition
to <bits/uniform_int_dist.h>.
* include/bits/ranges_algo.h: Include <bits/uniform_int_dist.h> instead
of <bits/random.h>.
* include/bits/ranges_algobase.h: Do not include <cmath>.
* include/bits/uniform_int_dist.h (uniform_random_bit_generator):
Move here.
* include/std/ranges: Do not include <limits>.
* testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
Diffstat (limited to 'gcc/tree-ssa.c')
0 files changed, 0 insertions, 0 deletions