]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Fix std::ranges::iota is not included in numeric [PR108760]
authorMichael Levine <mlevine55@bloomberg.net>
Fri, 7 Jun 2024 08:54:38 +0000 (09:54 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Sat, 8 Jun 2024 14:51:40 +0000 (15:51 +0100)
commit0bb1db32ccf54a9de59bea718f7575f7ef22abf5
tree25804a34ef04dffa28b5e3e578f26039e53ad9bc
parent77e84dc4e4e60ec5e7d6d1124e226452aa558108
libstdc++: Fix std::ranges::iota is not included in numeric [PR108760]

Before this patch, using std::ranges::iota required including
<algorithm> when it should have been sufficient to only include
<numeric>.

libstdc++-v3/ChangeLog:

PR libstdc++/108760
* include/bits/ranges_algo.h (ranges::out_value_result):
Move to <bits/ranges_algobase.h>.
(ranges::iota_result, ranges::__iota_fn, ranges::iota): Move to
<numeric>.
* include/bits/ranges_algobase.h (ranges::out_value_result):
Move to here.
* include/std/numeric (ranges::iota_result, ranges::__iota_fn)
(ranges::iota): Move to here.
* testsuite/25_algorithms/iota/1.cc: Renamed to ...
* testsuite/26_numerics/iota/2.cc: ... here.

Signed-off-by: Michael Levine <mlevine55@bloomberg.net>
libstdc++-v3/include/bits/ranges_algo.h
libstdc++-v3/include/bits/ranges_algobase.h
libstdc++-v3/include/std/numeric
libstdc++-v3/testsuite/26_numerics/iota/2.cc [moved from libstdc++-v3/testsuite/25_algorithms/iota/1.cc with 96% similarity]