* [committed] libstdc++: Reduce header dependencies of <algorithm> in C++20 [PR 92546]
@ 2021-10-08 14:00 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2021-10-08 14:00 UTC (permalink / raw)
To: libstdc++, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 318 bytes --]
The <bits/ranges_algobase.h> header doesn't need the stream and
streambuf iterators, so don't include the whole of <iterator>.
libstdc++-v3/ChangeLog:
PR libstdc++/92546
* include/bits/ranges_algobase.h: Replace <iterator> with a
subset of the headers it includes.
Tested powerpc64le-linux. Committed to trunk.
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1138 bytes --]
commit a1fc4075fcdf028f2e1dc00ce515a947127e2667
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Thu Apr 8 10:01:08 2021
libstdc++: Reduce header dependencies of <algorithm> in C++20 [PR 92546]
The <bits/ranges_algobase.h> header doesn't need the stream and
streambuf iterators, so don't include the whole of <iterator>.
libstdc++-v3/ChangeLog:
PR libstdc++/92546
* include/bits/ranges_algobase.h: Replace <iterator> with a
subset of the headers it includes.
diff --git a/libstdc++-v3/include/bits/ranges_algobase.h b/libstdc++-v3/include/bits/ranges_algobase.h
index cfbac839749..c8c4d032983 100644
--- a/libstdc++-v3/include/bits/ranges_algobase.h
+++ b/libstdc++-v3/include/bits/ranges_algobase.h
@@ -33,7 +33,9 @@
#if __cplusplus > 201703L
#include <compare>
-#include <iterator>
+#include <bits/stl_iterator_base_types.h>
+#include <bits/stl_iterator_base_funcs.h>
+#include <bits/stl_iterator.h>
#include <bits/ranges_base.h> // ranges::begin, ranges::range etc.
#include <bits/invoke.h> // __invoke
#include <bits/cpp_type_traits.h> // __is_byte
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-08 14:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08 14:00 [committed] libstdc++: Reduce header dependencies of <algorithm> in C++20 [PR 92546] Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).