From 9a9c7a625d3813d062a6b17d071bd8cc9fe5cb8b Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 17 Jun 2019 09:18:17 +0100 Subject: [PATCH] Fix tests that fail without PCH The recent change to stop transitively including broke some tests, but only when the library is configured without PCH, because otherwise the header still gets included via the precompiled header. * testsuite/20_util/bad_function_call/what.cc: Include header for std::string. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include header for std::allocator. * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add using-declaration for std::size_t. * testsuite/23_containers/array/tuple_interface/tuple_size.cc: Likewise. * testsuite/23_containers/deque/cons/55977.cc: Include for std::istream. * testsuite/23_containers/vector/cons/55977.cc: Likewise. * testsuite/experimental/map/erasure.cc: Include for std::string. * testsuite/experimental/unordered_map/erasure.cc: Likewise. From-SVN: r272376 --- libstdc++-v3/ChangeLog | 18 ++++++++++++++++++ .../20_util/bad_function_call/what.cc | 1 + .../shared_ptr/cons/weak_ptr_expired.cc | 1 + .../20_util/tuple/cons/allocator_with_any.cc | 1 + .../array/tuple_interface/tuple_element.cc | 2 +- .../array/tuple_interface/tuple_size.cc | 1 + .../23_containers/deque/cons/55977.cc | 1 + .../23_containers/vector/cons/55977.cc | 1 + .../testsuite/experimental/map/erasure.cc | 1 + .../experimental/unordered_map/erasure.cc | 1 + 10 files changed, 27 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 9eb70fcf8b6..542c937c4ab 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,21 @@ +2019-06-17 Jonathan Wakely + + * testsuite/20_util/bad_function_call/what.cc: Include header + for std::string. + * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. + * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include + header for std::allocator. + * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add + using-declaration for std::size_t. + * testsuite/23_containers/array/tuple_interface/tuple_size.cc: + Likewise. + * testsuite/23_containers/deque/cons/55977.cc: Include for + std::istream. + * testsuite/23_containers/vector/cons/55977.cc: Likewise. + * testsuite/experimental/map/erasure.cc: Include for + std::string. + * testsuite/experimental/unordered_map/erasure.cc: Likewise. + 2019-06-14 Jonathan Wakely * include/experimental/type_traits (experimental::nonesuch): Use diff --git a/libstdc++-v3/testsuite/20_util/bad_function_call/what.cc b/libstdc++-v3/testsuite/20_util/bad_function_call/what.cc index e17b42feedd..229c7ef1cab 100644 --- a/libstdc++-v3/testsuite/20_util/bad_function_call/what.cc +++ b/libstdc++-v3/testsuite/20_util/bad_function_call/what.cc @@ -18,6 +18,7 @@ // . #include +#include #include int main() diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc index f9c44cd60f3..a32a5c91943 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc @@ -20,6 +20,7 @@ // 20.6.6.2 Template class shared_ptr [util.smartptr.shared] #include +#include #include struct A { }; diff --git a/libstdc++-v3/testsuite/20_util/tuple/cons/allocator_with_any.cc b/libstdc++-v3/testsuite/20_util/tuple/cons/allocator_with_any.cc index 655b5328bda..154ec9161bd 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/cons/allocator_with_any.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/cons/allocator_with_any.cc @@ -23,6 +23,7 @@ // this test may begin to fail. #include +#include #include #include diff --git a/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element.cc b/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element.cc index b6fda44a3c5..e8b6bc12e77 100644 --- a/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element.cc +++ b/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element.cc @@ -29,7 +29,7 @@ test01() // This relies on the fact that includes : using std::is_same; - const size_t len = 3; + const std::size_t len = 3; typedef array array_type; static_assert(is_same::type, int>::value, "" ); diff --git a/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_size.cc b/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_size.cc index aedd5fc2a2d..740c42a8914 100644 --- a/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_size.cc +++ b/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_size.cc @@ -26,6 +26,7 @@ test01() { using std::array; using std::tuple_size; + using std::size_t; // This relies on the fact that includes : using std::is_same; diff --git a/libstdc++-v3/testsuite/23_containers/deque/cons/55977.cc b/libstdc++-v3/testsuite/23_containers/deque/cons/55977.cc index 492aedf97b4..5ab516a2950 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/cons/55977.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/cons/55977.cc @@ -21,6 +21,7 @@ #include #include #include +#include template struct MyAllocator diff --git a/libstdc++-v3/testsuite/23_containers/vector/cons/55977.cc b/libstdc++-v3/testsuite/23_containers/vector/cons/55977.cc index f7767923592..efa03b1edfd 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/cons/55977.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/cons/55977.cc @@ -21,6 +21,7 @@ #include #include #include +#include template struct MyAllocator diff --git a/libstdc++-v3/testsuite/experimental/map/erasure.cc b/libstdc++-v3/testsuite/experimental/map/erasure.cc index c636fcbb1b5..aa3d42da299 100644 --- a/libstdc++-v3/testsuite/experimental/map/erasure.cc +++ b/libstdc++-v3/testsuite/experimental/map/erasure.cc @@ -18,6 +18,7 @@ // . #include +#include #include auto is_odd_pair = [](const std::pair& p) diff --git a/libstdc++-v3/testsuite/experimental/unordered_map/erasure.cc b/libstdc++-v3/testsuite/experimental/unordered_map/erasure.cc index c08fa315271..79a42ffbdf9 100644 --- a/libstdc++-v3/testsuite/experimental/unordered_map/erasure.cc +++ b/libstdc++-v3/testsuite/experimental/unordered_map/erasure.cc @@ -18,6 +18,7 @@ // . #include +#include #include auto is_odd_pair = [](const std::pair& p) -- 2.30.2