Skip to content

Commit c97f431

Browse files
committed
[libc++] Remove a few includes from <__functional/hash.h>
1 parent 0ef66fc commit c97f431

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

libcxx/include/__functional/hash.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,20 @@
1010
#define _LIBCPP___FUNCTIONAL_HASH_H
1111

1212
#include <__config>
13-
#include <__functional/invoke.h>
1413
#include <__functional/unary_function.h>
1514
#include <__fwd/hash.h>
16-
#include <__tuple/sfinae_helpers.h>
15+
#include <__type_traits/conjunction.h>
16+
#include <__type_traits/invoke.h>
1717
#include <__type_traits/is_copy_constructible.h>
1818
#include <__type_traits/is_default_constructible.h>
1919
#include <__type_traits/is_enum.h>
2020
#include <__type_traits/is_move_constructible.h>
2121
#include <__type_traits/underlying_type.h>
22-
#include <__utility/forward.h>
23-
#include <__utility/move.h>
2422
#include <__utility/pair.h>
2523
#include <__utility/swap.h>
2624
#include <cstddef>
2725
#include <cstdint>
2826
#include <cstring>
29-
#include <limits>
3027

3128
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
3229
# pragma GCC system_header

libcxx/include/__tuple/sfinae_helpers.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <__tuple/tuple_like_ext.h>
1717
#include <__tuple/tuple_size.h>
1818
#include <__tuple/tuple_types.h>
19+
#include <__type_traits/conjunction.h>
1920
#include <__type_traits/enable_if.h>
2021
#include <__type_traits/integral_constant.h>
2122
#include <__type_traits/is_constructible.h>
@@ -32,12 +33,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
3233

3334
#ifndef _LIBCPP_CXX03_LANG
3435

35-
template <bool... _Preds>
36-
struct __all_dummy;
37-
38-
template <bool... _Pred>
39-
struct __all : _IsSame<__all_dummy<_Pred...>, __all_dummy<((void)_Pred, true)...>> {};
40-
4136
struct __tuple_sfinae_base {
4237
template <template <class, class...> class _Trait, class... _LArgs, class... _RArgs>
4338
static auto __do_test(__tuple_types<_LArgs...>, __tuple_types<_RArgs...>)

libcxx/include/__type_traits/conjunction.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <__type_traits/conditional.h>
1414
#include <__type_traits/enable_if.h>
1515
#include <__type_traits/integral_constant.h>
16+
#include <__type_traits/is_same.h>
1617

1718
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
1819
# pragma GCC system_header
@@ -37,6 +38,12 @@ false_type __and_helper(...);
3738
template <class... _Pred>
3839
using _And _LIBCPP_NODEBUG = decltype(std::__and_helper<_Pred...>(0));
3940

41+
template <bool... _Preds>
42+
struct __all_dummy;
43+
44+
template <bool... _Pred>
45+
struct __all : _IsSame<__all_dummy<_Pred...>, __all_dummy<((void)_Pred, true)...>> {};
46+
4047
#if _LIBCPP_STD_VER >= 17
4148

4249
template <class...>

libcxx/include/array

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ template <size_t I, class T, size_t N> const T&& get(const array<T, N>&&) noexce
122122
#include <__iterator/reverse_iterator.h>
123123
#include <__tuple/sfinae_helpers.h>
124124
#include <__type_traits/conditional.h>
125+
#include <__type_traits/conjunction.h>
125126
#include <__type_traits/is_array.h>
126127
#include <__type_traits/is_const.h>
127128
#include <__type_traits/is_constructible.h>

0 commit comments

Comments
 (0)