From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 4A9753834E5A; Thu, 26 May 2022 12:35:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4A9753834E5A 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 r13-776] libstdc++: Make headers include their prerequisites X-Act-Checkin: gcc X-Git-Author: Nathan Sidwell X-Git-Refname: refs/heads/master X-Git-Oldrev: ace4b7f295f407b16cfbc2e359f4ef7cd61d4a46 X-Git-Newrev: a44380541fee1c7ab14cc90a9af8d1aef3c72866 Message-Id: <20220526123534.4A9753834E5A@sourceware.org> Date: Thu, 26 May 2022 12:35:34 +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, 26 May 2022 12:35:34 -0000 https://gcc.gnu.org/g:a44380541fee1c7ab14cc90a9af8d1aef3c72866 commit r13-776-ga44380541fee1c7ab14cc90a9af8d1aef3c72866 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. 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) {