public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r12-4252] libstdc++: Reduce header dependencies of <algorithm> in C++20 [PR 92546]
Date: Fri,  8 Oct 2021 14:00:15 +0000 (GMT)	[thread overview]
Message-ID: <20211008140015.D34D6385840C@sourceware.org> (raw)

https://gcc.gnu.org/g:a1fc4075fcdf028f2e1dc00ce515a947127e2667

commit r12-4252-ga1fc4075fcdf028f2e1dc00ce515a947127e2667
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Apr 8 10:01:08 2021 +0100

    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:
---
 libstdc++-v3/include/bits/ranges_algobase.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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


                 reply	other threads:[~2021-10-08 14:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211008140015.D34D6385840C@sourceware.org \
    --to=redi@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).