From 86fd1b0b4aacd81954d8350b9fef81ff40608a2e Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Tue, 24 May 2022 10:17:18 +0100 Subject: [PATCH] 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) --- 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 5e1a417..edc151e 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 0f0b0f9..799c3e9 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 6e08f81..eee946c 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 e9dc54c..1551b22 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) { -- 2.7.4