From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 657CB385608E; Thu, 21 Jul 2022 11:16:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 657CB385608E MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-8595] libstdc++: Make headers include their prerequisites X-Act-Checkin: gcc X-Git-Author: Nathan Sidwell X-Git-Refname: refs/heads/releases/gcc-12 X-Git-Oldrev: 545e8fb1418f52fa9541afb03a39233c1106d673 X-Git-Newrev: 86fd1b0b4aacd81954d8350b9fef81ff40608a2e Message-Id: <20220721111654.657CB385608E@sourceware.org> Date: Thu, 21 Jul 2022 11:16:54 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2022 11:16:54 -0000 https://gcc.gnu.org/g:86fd1b0b4aacd81954d8350b9fef81ff40608a2e commit r12-8595-g86fd1b0b4aacd81954d8350b9fef81ff40608a2e Author: Nathan Sidwell Date: Tue May 24 10:17:18 2022 +0100 libstdc++: Make headers include their prerequisites 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 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. (cherry picked from commit a44380541fee1c7ab14cc90a9af8d1aef3c72866) Diff: --- 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 #endif +#include +#include // 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 // for std::tuple, std::forward_as_tuple #include // for std::min, std::is_permutation. +#include // for __gnu_cxx::__aligned_buffer +#include // for std::__alloc_rebind #include // 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 #include #include +#include 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 #include +#include namespace std _GLIBCXX_VISIBILITY(default) {