forked from OSchip/llvm-project
[libc++] Replace includes of <utility> with specific detail headers
Basically a rebase of D104980; most of that patch had already happened via gradual drive-by changes, but this finishes it up. Don't touch the inclusions from `<__functional_base>`, `<__hash_table>`, or `<__locale>`; those could be removed if we propagated the inclusions up to the includers of those files, but there are lots of those includers. `<algorithm>`, `<functional>`, and `<memory>` already include `<utility>` at the top level. `<iterator>` did not, so I've added it there. Differential Revision: https://reviews.llvm.org/D119020
This commit is contained in:
parent
a27304c50f
commit
ea2206d70d
|
@ -11,8 +11,8 @@
|
|||
|
||||
#include <__algorithm/comp.h>
|
||||
#include <__config>
|
||||
#include <__utility/pair.h>
|
||||
#include <initializer_list>
|
||||
#include <utility>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include <__algorithm/comp.h>
|
||||
#include <__config>
|
||||
#include <__iterator/iterator_traits.h>
|
||||
#include <utility>
|
||||
#include <__utility/pair.h>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include <__algorithm/comp.h>
|
||||
#include <__config>
|
||||
#include <__iterator/iterator_traits.h>
|
||||
#include <utility>
|
||||
#include <__utility/pair.h>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include <__utility/move.h>
|
||||
#include <cstring>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
|
||||
#include <__algorithm/unwrap_iter.h>
|
||||
#include <__config>
|
||||
#include <__utility/move.h>
|
||||
#include <cstring>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include <__config>
|
||||
#include <__iterator/iterator_traits.h>
|
||||
#include <utility> // pair
|
||||
#include <__utility/pair.h>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include <__algorithm/find_if.h>
|
||||
#include <__config>
|
||||
#include <utility>
|
||||
#include <__utility/move.h>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include <__algorithm/comp.h>
|
||||
#include <__config>
|
||||
#include <__iterator/iterator_traits.h>
|
||||
#include <utility>
|
||||
#include <__utility/pair.h>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include <__algorithm/comp.h>
|
||||
#include <__config>
|
||||
#include <__iterator/iterator_traits.h>
|
||||
#include <utility>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
#include <__config>
|
||||
#include <__functional/invoke.h>
|
||||
#include <__functional/perfect_forward.h>
|
||||
#include <__utility/forward.h>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <__config>
|
||||
#include <__functional/operations.h>
|
||||
#include <__iterator/iterator_traits.h>
|
||||
#include <utility>
|
||||
#include <__utility/pair.h>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
|
|
@ -20,10 +20,11 @@
|
|||
#include <__memory/allocator_traits.h>
|
||||
#include <__memory/compressed_pair.h>
|
||||
#include <__memory/shared_ptr.h>
|
||||
#include <__utility/forward.h>
|
||||
#include <__utility/move.h>
|
||||
#include <exception>
|
||||
#include <memory> // TODO: replace with <__memory/__builtin_new_allocator.h>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#define _LIBCPP___FUNCTIONAL_IDENTITY_H
|
||||
|
||||
#include <__config>
|
||||
#include <utility>
|
||||
#include <__utility/forward.h>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
#include <__functional/binary_function.h>
|
||||
#include <__functional/invoke.h>
|
||||
#include <__functional/weak_result_type.h>
|
||||
#include <utility>
|
||||
#include <__utility/forward.h>
|
||||
#include <type_traits>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
#include <__config>
|
||||
#include <__functional/invoke.h>
|
||||
#include <__functional/perfect_forward.h>
|
||||
#include <utility>
|
||||
#include <__utility/forward.h>
|
||||
#include <type_traits>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
#define _LIBCPP___FUNCTIONAL_RANGES_OPERATIONS_H
|
||||
|
||||
#include <__config>
|
||||
#include <__utility/forward.h>
|
||||
#include <concepts>
|
||||
#include <utility>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
#include <__config>
|
||||
#include <__iterator/iterator_traits.h>
|
||||
#include <__utility/forward.h>
|
||||
#include <__utility/move.h>
|
||||
#include <concepts> // __class_or_enum
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
|
||||
#include <__config>
|
||||
#include <__memory/allocator_traits.h>
|
||||
#include <__utility/move.h>
|
||||
#include <cstddef>
|
||||
#include <utility>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
|
||||
#include <__config>
|
||||
#include <__utility/forward.h>
|
||||
#include <__utility/move.h>
|
||||
#include <tuple> // needed in c++03 for some constructors
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
#include <__memory/addressof.h>
|
||||
#include <__memory/voidify.h>
|
||||
#include <__utility/forward.h>
|
||||
#include <__utility/move.h>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
|
||||
#include <__config>
|
||||
#include <__memory/addressof.h>
|
||||
#include <__utility/move.h>
|
||||
#include <cstddef>
|
||||
#include <iterator>
|
||||
#include <utility>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
|
|
@ -24,13 +24,13 @@
|
|||
#include <__memory/pointer_traits.h>
|
||||
#include <__memory/unique_ptr.h>
|
||||
#include <__utility/forward.h>
|
||||
#include <__utility/move.h>
|
||||
#include <cstddef>
|
||||
#include <cstdlib> // abort
|
||||
#include <iosfwd>
|
||||
#include <stdexcept>
|
||||
#include <type_traits>
|
||||
#include <typeinfo>
|
||||
#include <utility>
|
||||
#if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER)
|
||||
# include <atomic>
|
||||
#endif
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
#define _LIBCPP___MEMORY_TEMPORARY_BUFFER_H
|
||||
|
||||
#include <__config>
|
||||
#include <__utility/pair.h>
|
||||
#include <cstddef>
|
||||
#include <new>
|
||||
#include <utility> // pair
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
|
|
@ -11,11 +11,12 @@
|
|||
#define _LIBCPP___MEMORY_UNINITIALIZED_ALGORITHMS_H
|
||||
|
||||
#include <__config>
|
||||
#include <__iterator/iterator_traits.h>
|
||||
#include <__memory/addressof.h>
|
||||
#include <__memory/construct_at.h>
|
||||
#include <__memory/voidify.h>
|
||||
#include <iterator>
|
||||
#include <utility>
|
||||
#include <__utility/move.h>
|
||||
#include <__utility/pair.h>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
#include <__memory/allocator_traits.h> // __pointer
|
||||
#include <__memory/compressed_pair.h>
|
||||
#include <__utility/forward.h>
|
||||
#include <__utility/move.h>
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
|
||||
# include <__memory/auto_ptr.h>
|
||||
|
|
|
@ -662,7 +662,7 @@ template<class InputIterator, class OutputIterator>
|
|||
|
||||
*/
|
||||
|
||||
#include <__bits> // __libcpp_clz
|
||||
#include <__bits>
|
||||
#include <__config>
|
||||
#include <__debug>
|
||||
#include <cstddef>
|
||||
|
@ -672,7 +672,7 @@ template<class InputIterator, class OutputIterator>
|
|||
#include <iterator>
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
#include <utility> // swap_ranges
|
||||
#include <utility>
|
||||
#include <version>
|
||||
|
||||
#include <__algorithm/adjacent_find.h>
|
||||
|
|
|
@ -628,12 +628,12 @@ template <class E> constexpr const E* data(initializer_list<E> il) noexcept;
|
|||
#include <__iterator/wrap_iter.h>
|
||||
#include <__memory/addressof.h>
|
||||
#include <__memory/pointer_traits.h>
|
||||
#include <__utility/forward.h>
|
||||
#include <compare>
|
||||
#include <concepts> // Mandated by the Standard.
|
||||
#include <cstddef>
|
||||
#include <initializer_list>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <version>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
|
|
Loading…
Reference in New Issue