Skip to content

Commit 152bda7

Browse files
authored
[libc++] Replace the last uses of __tuple_types with __type_list (#167214)
`__tuple_types` is at this point just a `__type_list` with a weird name, so we can just replace the few places it's still used.
1 parent 3637f66 commit 152bda7

File tree

5 files changed

+7
-35
lines changed

5 files changed

+7
-35
lines changed

libcxx/include/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,6 @@ set(files
786786
__tuple/tuple_like.h
787787
__tuple/tuple_like_no_subrange.h
788788
__tuple/tuple_size.h
789-
__tuple/tuple_types.h
790789
__type_traits/add_cv_quals.h
791790
__type_traits/add_pointer.h
792791
__type_traits/add_reference.h

libcxx/include/__tuple/tuple_size.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <__config>
1313
#include <__cstddef/size_t.h>
1414
#include <__fwd/tuple.h>
15-
#include <__tuple/tuple_types.h>
1615
#include <__type_traits/enable_if.h>
1716
#include <__type_traits/integral_constant.h>
1817
#include <__type_traits/is_const.h>

libcxx/include/__tuple/tuple_types.h

Lines changed: 0 additions & 25 deletions
This file was deleted.

libcxx/include/module.modulemap.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2124,7 +2124,6 @@ module std [system] {
21242124
module tuple_like_no_subrange { header "__tuple/tuple_like_no_subrange.h" }
21252125
module tuple_like { header "__tuple/tuple_like.h" }
21262126
module tuple_size { header "__tuple/tuple_size.h" }
2127-
module tuple_types { header "__tuple/tuple_types.h" }
21282127

21292128
header "tuple"
21302129
export *

libcxx/include/tuple

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ template <class... Types>
235235
# include <__tuple/tuple_element.h>
236236
# include <__tuple/tuple_like.h>
237237
# include <__tuple/tuple_size.h>
238-
# include <__tuple/tuple_types.h>
239238
# include <__type_traits/common_reference.h>
240239
# include <__type_traits/common_type.h>
241240
# include <__type_traits/conditional.h>
@@ -265,6 +264,7 @@ template <class... Types>
265264
# include <__type_traits/remove_cv.h>
266265
# include <__type_traits/remove_cvref.h>
267266
# include <__type_traits/remove_reference.h>
267+
# include <__type_traits/type_list.h>
268268
# include <__type_traits/unwrap_ref.h>
269269
# include <__utility/declval.h>
270270
# include <__utility/forward.h>
@@ -571,7 +571,7 @@ __memberwise_copy_assign(_Dest& __dest, _Source const& __source, __index_sequenc
571571

572572
template <class _Dest, class _Source, class... _Up, size_t... _Np>
573573
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
574-
__memberwise_forward_assign(_Dest& __dest, _Source&& __source, __tuple_types<_Up...>, __index_sequence<_Np...>) {
574+
__memberwise_forward_assign(_Dest& __dest, _Source&& __source, __type_list<_Up...>, __index_sequence<_Np...>) {
575575
std::__swallow(((std::get<_Np>(__dest) = std::forward<_Up>(std::get<_Np>(__source))), void(), 0)...);
576576
}
577577

@@ -876,7 +876,7 @@ public:
876876
requires(_And<is_assignable<const _Tp&, _Tp>...>::value)
877877
{
878878
std::__memberwise_forward_assign(
879-
*this, std::move(__tuple), __tuple_types<_Tp...>(), __make_index_sequence<sizeof...(_Tp)>());
879+
*this, std::move(__tuple), __type_list<_Tp...>(), __make_index_sequence<sizeof...(_Tp)>());
880880
return *this;
881881
}
882882
# endif // _LIBCPP_STD_VER >= 23
@@ -885,7 +885,7 @@ public:
885885
operator=(_If<_And<is_move_assignable<_Tp>...>::value, tuple, __nat>&& __tuple) noexcept(
886886
_And<is_nothrow_move_assignable<_Tp>...>::value) {
887887
std::__memberwise_forward_assign(
888-
*this, std::move(__tuple), __tuple_types<_Tp...>(), __make_index_sequence<sizeof...(_Tp)>());
888+
*this, std::move(__tuple), __type_list<_Tp...>(), __make_index_sequence<sizeof...(_Tp)>());
889889
return *this;
890890
}
891891

@@ -905,7 +905,7 @@ public:
905905
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple&
906906
operator=(tuple<_Up...>&& __tuple) noexcept(_And<is_nothrow_assignable<_Tp&, _Up>...>::value) {
907907
std::__memberwise_forward_assign(
908-
*this, std::move(__tuple), __tuple_types<_Up...>(), __make_index_sequence<sizeof...(_Tp)>());
908+
*this, std::move(__tuple), __type_list<_Up...>(), __make_index_sequence<sizeof...(_Tp)>());
909909
return *this;
910910
}
911911

@@ -922,7 +922,7 @@ public:
922922
enable_if_t< _And<_BoolConstant<sizeof...(_Tp) == sizeof...(_UTypes)>,
923923
is_assignable<const _Tp&, _UTypes>...>::value>* = nullptr>
924924
_LIBCPP_HIDE_FROM_ABI constexpr const tuple& operator=(tuple<_UTypes...>&& __u) const {
925-
std::__memberwise_forward_assign(*this, __u, __tuple_types<_UTypes...>(), __make_index_sequence<sizeof...(_Tp)>());
925+
std::__memberwise_forward_assign(*this, __u, __type_list<_UTypes...>(), __make_index_sequence<sizeof...(_Tp)>());
926926
return *this;
927927
}
928928
# endif // _LIBCPP_STD_VER >= 23
@@ -1000,7 +1000,7 @@ public:
10001000
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 tuple&
10011001
operator=(array<_Up, _Np>&& __array) noexcept(_And<is_nothrow_assignable<_Tp&, _Up>...>::value) {
10021002
std::__memberwise_forward_assign(
1003-
*this, std::move(__array), __tuple_types<_If<true, _Up, _Tp>...>(), __make_index_sequence<sizeof...(_Tp)>());
1003+
*this, std::move(__array), __type_list<_If<true, _Up, _Tp>...>(), __make_index_sequence<sizeof...(_Tp)>());
10041004
return *this;
10051005
}
10061006

0 commit comments

Comments
 (0)