public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: [committed] libstdc++: Reduce header dependencies of <algorithm> in C++20 [PR 92546]
Date: Fri, 8 Oct 2021 15:00:23 +0100	[thread overview]
Message-ID: <YWBO94Gm8KiVpoa1@redhat.com> (raw)

[-- 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

                 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=YWBO94Gm8KiVpoa1@redhat.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@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).