https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92546

--- Comment #23 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The other improvement we could make for C++20 is to replace <iterator> in
<bits/ranges_algobase.h> with smaller pieces, as it doesn't need the definition
of std::streambuf_iterator:

--- a/libstdc++-v3/include/bits/ranges_algobase.h
+++ b/libstdc++-v3/include/bits/ranges_algobase.h
@@ -33,7 +33,10 @@
 #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/range_access.h>
 #include <bits/ranges_base.h> // ranges::begin, ranges::range etc.
 #include <bits/invoke.h>      // __invoke
 #include <bits/cpp_type_traits.h> // __is_byte


And <bits/streambuf_iterator> doesn't need <streambuf>, just <iosfwd>.

Reply via email to