aboutsummaryrefslogtreecommitdiff
path: root/libphobos/libdruntime
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2021-04-08 16:45:25 -0400
committerPatrick Palka <ppalka@redhat.com>2021-04-08 16:45:25 -0400
commitc1ce418af29bc1796bfe82a5aa97639eccc30cb7 (patch)
tree8e83c28f2641e404759d09fe0f54438f7c6ec275 /libphobos/libdruntime
parentc7fe68f3652ceefaf297611d1e64c8d9da43ad93 (diff)
downloadgcc-c1ce418af29bc1796bfe82a5aa97639eccc30cb7.zip
gcc-c1ce418af29bc1796bfe82a5aa97639eccc30cb7.tar.gz
gcc-c1ce418af29bc1796bfe82a5aa97639eccc30cb7.tar.bz2
libstdc++: Simplify copy-pasted algorithms in <ranges>
The <ranges> header currently copies some simple algorithms from <bits/ranges_algo.h>, which was originally done in order to avoid a circular dependency with the header. This is no longer an issue since the latter header now includes <bits/ranges_util.h> instead of all of <ranges>. This means we could now just include <bits/ranges_algo.h> and remove the copied algorithms, but that'd increase the size of <ranges> by ~10%. And we can't use the corresponding STL-style algorithms here because they assume input iterators are copyable. So this patch instead simplifies these copied algorithms, removing their constraints and unused parameters, and keeps them around. In a subsequent patch we're going to copy (a simplified version of) ranges::find into <ranges> as well. libstdc++-v3/ChangeLog: * include/std/ranges (__detail::find_if): Simplify. (__detail::find_if_not): Likewise. (__detail::min): Remove. (__detail::mismatch): Simplify. (take_view::size): Use std::min instead of __detail::min.
Diffstat (limited to 'libphobos/libdruntime')
0 files changed, 0 insertions, 0 deletions