[libc++] Remove <utility> includes
authorNikolas Klauser <nikolasklauser@berlin.de>
Mon, 7 Mar 2022 15:31:33 +0000 (16:31 +0100)
committerNikolas Klauser <nikolasklauser@berlin.de>
Wed, 16 Mar 2022 23:12:33 +0000 (00:12 +0100)
Reviewed By: ldionne, Quuxplusone, #libc

Spies: libcxx-commits, arphaman

Differential Revision: https://reviews.llvm.org/D121054

19 files changed:
libcxx/docs/ReleaseNotes.rst
libcxx/include/__hash_table
libcxx/include/__locale
libcxx/include/algorithm
libcxx/include/array
libcxx/include/experimental/memory_resource
libcxx/include/experimental/propagate_const
libcxx/include/functional
libcxx/include/iterator
libcxx/include/map
libcxx/include/memory
libcxx/include/optional
libcxx/include/ranges
libcxx/include/regex
libcxx/include/string
libcxx/include/tuple
libcxx/include/typeindex
libcxx/include/variant
libcxx/include/vector

index bc3251e5b42d4ce7f1734b9d94f7e81cf518f1f5..ee1cc816e12eb3083c6247781f0edf1921aa0365 100644 (file)
@@ -59,10 +59,10 @@ API Changes
   ``<filesystem>`` header. The associated macro
   ``_LIBCPP_DEPRECATED_EXPERIMENTAL_FILESYSTEM`` has also been removed.
 
-- Some libc++ headers no longer transitively include all of ``<algorithm>``and ``<chrono>``.
+- Some libc++ headers no longer transitively include all of ``<algorithm>``, ``<chrono>`` and ``<utility>``.
   If, after updating libc++, you see compiler errors related to missing declarations in
   namespace ``std``, it might be because one of your source files now needs to
-  ``#include <algorithm>`` and/or ``#include <chrono>``.
+  ``#include <algorithm>``, ``#include <chrono>`` and/or ``#include <utility>``.
 
 - The integer distributions ``binomial_distribution``, ``discrete_distribution``,
   ``geometric_distribution``, ``negative_binomial_distribution``, ``poisson_distribution``,
index eae111bf6043cefb005a0248024070173a2911b9..d53132437767f3e4f8302cf0a68f83b8bab99229 100644 (file)
@@ -24,8 +24,6 @@
 #include <memory>
 #include <type_traits>
 
-#include <utility> // TODO: Remove this
-
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
index a31112d3da29ea7ef6a864ca329d8bd3461ee5f0..9fd707c7651cafb21b91329b55508cd59aceb7a1 100644 (file)
@@ -19,8 +19,6 @@
 #include <mutex>
 #include <string>
 
-#include <utility> // TODO: Remove this
-
 #if defined(_LIBCPP_MSVCRT_LIKE)
 # include <__support/win32/locale_win32.h>
 # include <cstring>
index 6fe66e425ef738f0aabebc6cd71005ad314ebcee..8383b40f20ef973c7ed059a4542ea6c68dbc2354 100644 (file)
@@ -733,8 +733,6 @@ template <class BidirectionalIterator, class Compare>
 #include <type_traits>
 #include <version>
 
-#include <utility> // TODO: Remove this
-
 #include <__algorithm/adjacent_find.h>
 #include <__algorithm/all_of.h>
 #include <__algorithm/any_of.h>
index ce419210667d70fb62a272808b57e8579a66dc77..0b366080eefca2a80cee89e919db52a733152f68 100644 (file)
@@ -123,8 +123,6 @@ template <size_t I, class T, size_t N> const T&& get(const array<T, N>&&) noexce
 #include <type_traits>
 #include <version>
 
-#include <utility> // TODO: Remove this
-
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
index 359ac70be014df0a88c0705507b2e3854e6f14ae..16c7d8de66c54c8537acaa6e3f1027750adb8c08 100644 (file)
@@ -77,8 +77,6 @@ namespace pmr {
 #include <stdexcept>
 #include <type_traits>
 
-#include <utility> // TODO: Remove this
-
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
index b6c3827871ae0572cc0bdea8ea18da193b3bb655..e6224225e3b16d257c71156b03d61845bb619f44 100644 (file)
 #include <functional>
 #include <type_traits>
 
-#include <utility> // TODO: Remove this
-
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
index 09f6ec52235afce22c149d6283c0665753cd1cac..d097861a9011d3f53741c44d493e1e5a6c65af49 100644 (file)
@@ -527,8 +527,6 @@ POLICY:  For non-variadic implementations, the number of arguments is limited
 #include <typeinfo>
 #include <version>
 
-#include <utility> // TODO: Remove this
-
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
index 312939599d29fed63859877882870e2cf8078df7..852fa353a9c2a3c872306f4fa412618c09c19d49 100644 (file)
@@ -656,8 +656,6 @@ template <class E> constexpr const E* data(initializer_list<E> il) noexcept;
 #include <type_traits>
 #include <version>
 
-#include <utility> // TODO: Remove this
-
 // TODO: remove these headers
 #include <__functional/binary_function.h>
 #include <__functional/invoke.h>
index 4aae8dbc1b4b1f612e18aacb95a37a419840e36e..2266e1abe9e5bf9d50076253ef44cb3a40c74f29 100644 (file)
@@ -546,8 +546,6 @@ erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred);  // C++20
 #include <type_traits>
 #include <version>
 
-#include <utility> // TODO: Remove this
-
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
index 1fccdacdcf862539ad7b48819187fbabeb8a7507..1991e29228d165f47088f53f83955dfb8baa48ac 100644 (file)
@@ -835,8 +835,6 @@ void* align(size_t alignment, size_t size, void*& ptr, size_t& space);
 #include <typeinfo>
 #include <version>
 
-#include <utility> // TODO: Remove this
-
 // TODO: remove these headers
 #include <__functional/binary_function.h>
 #include <__functional/invoke.h>
index effee3018ab394ba959db67cf89f2a6baa9daf8a..22b0cf16cdc7fe432a0ec9b24247308c1e318da1 100644 (file)
@@ -172,8 +172,6 @@ template<class T>
 #include <type_traits>
 #include <version>
 
-#include <utility> // TODO: Remove this
-
 // TODO: remove these headers
 #include <__memory/allocator_arg_t.h>
 #include <__memory/uses_allocator.h>
index 25ed65ba1ed3ec6a77f871e24e92888ae480915f..b6c028d2219b6bca52533342baa56720cb2d344e 100644 (file)
@@ -256,6 +256,7 @@ namespace std {
 #include <__ranges/transform_view.h>
 #include <__ranges/view_interface.h>
 #include <__ranges/views.h>
+#include <__tuple> // TODO: <ranges> has to export std::tuple_size. Replace this, once <tuple> is granularized.
 #include <compare>          // Required by the standard.
 #include <initializer_list> // Required by the standard.
 #include <iterator>         // Required by the standard.
index 56d92f2d51be3208090741d9ab0d5c78b89782bd..661a08b7c30c7752a4156acd0242fa423cb3a16e 100644 (file)
@@ -779,8 +779,6 @@ typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator;
 #include <vector>
 #include <version>
 
-#include <utility> // TODO: Remove this
-
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
index 1d0b7831cd6577bb720ad0dac40e28975867dd1f..c79c0ed72abd860c8307f02d9aa2f9a684c58ca1 100644 (file)
@@ -543,8 +543,6 @@ basic_string<char32_t> operator "" s( const char32_t *str, size_t len ); // C++1
 #include <type_traits>
 #include <version>
 
-#include <utility> // TODO: Remove this
-
 // TODO: remove these headers
 #include <__functional/binary_function.h>
 #include <__functional/invoke.h>
index e1303f9c8b127b7fd396de11f429e4b056b5e9e4..ea7245d7aa88a9a2dcabc920eb9b2075983f15d1 100644 (file)
@@ -183,8 +183,6 @@ template <class... Types>
 #include <type_traits>
 #include <version>
 
-#include <utility> // TODO: Remove this
-
 // TODO: remove these headers
 #include <__functional/binary_function.h>
 #include <__functional/invoke.h>
index 592da67b1b82db81d9c09bc5a7d97b70d9db46e3..f0680398e9a152fc49c531bc3db6c6dc0f059421 100644 (file)
@@ -50,8 +50,6 @@ struct hash<type_index>
 #include <typeinfo>
 #include <version>
 
-#include <utility> // TODO: Remove this
-
 // TODO: remove these headers
 #include <__functional/binary_function.h>
 #include <__functional/invoke.h>
index 2eb93ba9525c5f9af8493f91941158a9a1babe73..15c4367404ff7beb0e5358a1fe632c46f44bf06a 100644 (file)
@@ -219,8 +219,6 @@ namespace std {
 #include <type_traits>
 #include <version>
 
-#include <utility> // TODO: Remove this
-
 // TODO: remove these headers
 #include <__functional/binary_function.h>
 #include <__functional/invoke.h>
index b5bafbe18bca75e8b6cf20846e2f93db71f97bbc..97a8524987445bfd7545f4a544ca4e78ad8d3bf3 100644 (file)
@@ -302,8 +302,6 @@ erase_if(vector<T, Allocator>& c, Predicate pred);    // C++20
 #include <type_traits>
 #include <version>
 
-#include <utility> // TODO: Remove this
-
 // TODO: remove these headers
 #include <__functional/binary_function.h>
 #include <__functional/invoke.h>