From: Jonathan Wakely Date: Thu, 6 Jun 2019 15:34:56 +0000 (+0100) Subject: Avoid unnecessary inclusion of header X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=beb0086f592563ddd2b14444d4e2495b17b1d4bf;p=gcc.git Avoid unnecessary inclusion of header This can greatly reduce the amount of preprocessed code that is included by other headers, because depends on which is huge. * include/std/array: Do not include . * include/std/optional: Include and instead of . * testsuite/20_util/function_objects/searchers.cc: Include for std::isalnum. * testsuite/20_util/tuple/cons/deduction.cc: Include for std::allocator. * testsuite/23_containers/map/erasure.cc: Include . * testsuite/23_containers/unordered_map/erasure.cc: Likewise. From-SVN: r272011 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index f1294f0c058..39f8b0e3575 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,15 @@ 2019-06-06 Jonathan Wakely + * include/std/array: Do not include . + * include/std/optional: Include and + instead of . + * testsuite/20_util/function_objects/searchers.cc: Include + for std::isalnum. + * testsuite/20_util/tuple/cons/deduction.cc: Include for + std::allocator. + * testsuite/23_containers/map/erasure.cc: Include . + * testsuite/23_containers/unordered_map/erasure.cc: Likewise. + * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add dg-prune-output for different C++98 diagnostic. * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc: diff --git a/libstdc++-v3/include/std/array b/libstdc++-v3/include/std/array index 02c6f4b4dbe..230e2b0f593 100644 --- a/libstdc++-v3/include/std/array +++ b/libstdc++-v3/include/std/array @@ -36,7 +36,7 @@ #else #include -#include +#include #include #include diff --git a/libstdc++-v3/include/std/optional b/libstdc++-v3/include/std/optional index ae825d3e327..79cd6c97019 100644 --- a/libstdc++-v3/include/std/optional +++ b/libstdc++-v3/include/std/optional @@ -35,10 +35,10 @@ #include #include -#include +#include #include #include -#include +#include #include #include diff --git a/libstdc++-v3/testsuite/20_util/function_objects/searchers.cc b/libstdc++-v3/testsuite/20_util/function_objects/searchers.cc index aae21d28d3a..fc278860f5c 100644 --- a/libstdc++-v3/testsuite/20_util/function_objects/searchers.cc +++ b/libstdc++-v3/testsuite/20_util/function_objects/searchers.cc @@ -19,6 +19,7 @@ #include #include +#include #ifdef _GLIBCXX_USE_WCHAR_T # include #endif diff --git a/libstdc++-v3/testsuite/20_util/tuple/cons/deduction.cc b/libstdc++-v3/testsuite/20_util/tuple/cons/deduction.cc index fa91f8fa539..eb3f2f3d6ab 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/cons/deduction.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/cons/deduction.cc @@ -19,6 +19,7 @@ // . #include +#include template struct require_same; template struct require_same { using type = void; }; diff --git a/libstdc++-v3/testsuite/23_containers/map/erasure.cc b/libstdc++-v3/testsuite/23_containers/map/erasure.cc index d8a57160865..5b211c3602b 100644 --- a/libstdc++-v3/testsuite/23_containers/map/erasure.cc +++ b/libstdc++-v3/testsuite/23_containers/map/erasure.cc @@ -19,6 +19,7 @@ // . #include +#include #include #ifndef __cpp_lib_erase_if diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/erasure.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/erasure.cc index 35190a0d19e..17bb940f00f 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_map/erasure.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/erasure.cc @@ -19,6 +19,7 @@ // . #include +#include #include #ifndef __cpp_lib_erase_if