From: Jonathan Wakely <jwakely@redhat.com>
To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Cc: Nathan Sidwell <nathan@acm.org>
Subject: [committed 1/3] libstdc++: Make headers include their prerequisites
Date: Thu, 26 May 2022 13:36:30 +0100 [thread overview]
Message-ID: <20220526123632.1284224-1-jwakely@redhat.com> (raw)
From: Nathan Sidwell <nathan@acm.org>
Tested powerpc64le-linux, pushed to trunk.
-- >8 --
These headers were relying on their includers having already included
some prerequisites. That makes them unsuitable to be header-units.
So directly include the needed headers.
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:
* include/bits/hashtable.h: Include required headers.
* include/bits/hashtable_policy.h: Likewise.
* include/bits/stl_heap.h: Likewise.
* include/bits/stl_iterator_base_funcs.h: Likewise.
---
libstdc++-v3/include/bits/hashtable.h | 2 ++
libstdc++-v3/include/bits/hashtable_policy.h | 2 ++
libstdc++-v3/include/bits/stl_heap.h | 1 +
libstdc++-v3/include/bits/stl_iterator_base_funcs.h | 1 +
4 files changed, 6 insertions(+)
diff --git a/libstdc++-v3/include/bits/hashtable.h b/libstdc++-v3/include/bits/hashtable.h
index 5e1a417f7cd..edc151ef15b 100644
--- a/libstdc++-v3/include/bits/hashtable.h
+++ b/libstdc++-v3/include/bits/hashtable.h
@@ -37,6 +37,8 @@
#if __cplusplus > 201402L
# include <bits/node_handle.h>
#endif
+#include <bits/functional_hash.h>
+#include <bits/stl_function.h> // equal_to, _Identity, _Select1st
namespace std _GLIBCXX_VISIBILITY(default)
{
diff --git a/libstdc++-v3/include/bits/hashtable_policy.h b/libstdc++-v3/include/bits/hashtable_policy.h
index 0f0b0f9ea51..799c3e986b4 100644
--- a/libstdc++-v3/include/bits/hashtable_policy.h
+++ b/libstdc++-v3/include/bits/hashtable_policy.h
@@ -33,6 +33,8 @@
#include <tuple> // for std::tuple, std::forward_as_tuple
#include <bits/stl_algobase.h> // for std::min, std::is_permutation.
+#include <ext/aligned_buffer.h> // for __gnu_cxx::__aligned_buffer
+#include <ext/alloc_traits.h> // for std::__alloc_rebind
#include <ext/numeric_traits.h> // for __gnu_cxx::__int_traits
namespace std _GLIBCXX_VISIBILITY(default)
diff --git a/libstdc++-v3/include/bits/stl_heap.h b/libstdc++-v3/include/bits/stl_heap.h
index 6e08f81c115..eee946c3818 100644
--- a/libstdc++-v3/include/bits/stl_heap.h
+++ b/libstdc++-v3/include/bits/stl_heap.h
@@ -58,6 +58,7 @@
#include <debug/debug.h>
#include <bits/move.h>
#include <bits/predefined_ops.h>
+#include <bits/stl_iterator_base_funcs.h>
namespace std _GLIBCXX_VISIBILITY(default)
{
diff --git a/libstdc++-v3/include/bits/stl_iterator_base_funcs.h b/libstdc++-v3/include/bits/stl_iterator_base_funcs.h
index e9dc54cc628..1551b226ff4 100644
--- a/libstdc++-v3/include/bits/stl_iterator_base_funcs.h
+++ b/libstdc++-v3/include/bits/stl_iterator_base_funcs.h
@@ -63,6 +63,7 @@
#include <bits/concept_check.h>
#include <debug/assertions.h>
+#include <bits/stl_iterator_base_types.h>
namespace std _GLIBCXX_VISIBILITY(default)
{
--
2.34.3
next reply other threads:[~2022-05-26 12:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-26 12:36 Jonathan Wakely [this message]
2022-05-26 12:36 ` [committed 2/3] libstdc++: Remove some unnecessary includes Jonathan Wakely
2022-05-26 12:36 ` [committed 3/3] libstdc++: Refactor includes for unordered containers Jonathan Wakely
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=20220526123632.1284224-1-jwakely@redhat.com \
--to=jwakely@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
--cc=nathan@acm.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).