diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt index ddace8bf8c728..dd1e71380e7fc 100644 --- a/libcxx/include/CMakeLists.txt +++ b/libcxx/include/CMakeLists.txt @@ -782,7 +782,6 @@ set(files __tuple/sfinae_helpers.h __tuple/tuple_element.h __tuple/tuple_like.h - __tuple/tuple_like_ext.h __tuple/tuple_like_no_subrange.h __tuple/tuple_size.h __tuple/tuple_types.h diff --git a/libcxx/include/__tuple/tuple_like_ext.h b/libcxx/include/__tuple/tuple_like_ext.h deleted file mode 100644 index 5a6748a9cc79d..0000000000000 --- a/libcxx/include/__tuple/tuple_like_ext.h +++ /dev/null @@ -1,41 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP___TUPLE_TUPLE_LIKE_EXT_H -#define _LIBCPP___TUPLE_TUPLE_LIKE_EXT_H - -#include <__config> -#include <__cstddef/size_t.h> -#include <__fwd/array.h> -#include <__fwd/pair.h> -#include <__fwd/tuple.h> -#include <__type_traits/integral_constant.h> - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif - -_LIBCPP_BEGIN_NAMESPACE_STD - -template -struct __tuple_like_ext : false_type {}; - -#ifndef _LIBCPP_CXX03_LANG -template -struct __tuple_like_ext > : true_type {}; -#endif - -template -struct __tuple_like_ext > : true_type {}; - -template -struct __tuple_like_ext > : true_type {}; - -_LIBCPP_END_NAMESPACE_STD - -#endif // _LIBCPP___TUPLE_TUPLE_LIKE_EXT_H diff --git a/libcxx/include/module.modulemap.in b/libcxx/include/module.modulemap.in index 894093b409e11..a86d6c6a43d0e 100644 --- a/libcxx/include/module.modulemap.in +++ b/libcxx/include/module.modulemap.in @@ -2115,7 +2115,6 @@ module std [system] { module ignore { header "__tuple/ignore.h" } module sfinae_helpers { header "__tuple/sfinae_helpers.h" } module tuple_element { header "__tuple/tuple_element.h" } - module tuple_like_ext { header "__tuple/tuple_like_ext.h" } module tuple_like_no_subrange { header "__tuple/tuple_like_no_subrange.h" } module tuple_like { header "__tuple/tuple_like.h" } module tuple_size { header "__tuple/tuple_size.h" } diff --git a/libcxx/include/tuple b/libcxx/include/tuple index b0d0c38b115a2..5f3bb72e0678b 100644 --- a/libcxx/include/tuple +++ b/libcxx/include/tuple @@ -234,7 +234,6 @@ template # include <__tuple/ignore.h> # include <__tuple/tuple_element.h> # include <__tuple/tuple_like.h> -# include <__tuple/tuple_like_ext.h> # include <__tuple/tuple_size.h> # include <__tuple/tuple_types.h> # include <__type_traits/common_reference.h> @@ -1273,15 +1272,19 @@ operator<=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y) { template struct __tuple_cat_return_impl; -template -struct __tuple_cat_return_impl<_Tuple> { - using type _LIBCPP_NODEBUG = _Tuple; +template +struct __tuple_cat_return_impl> { + using type _LIBCPP_NODEBUG = tuple<_Types...>; }; -template class _Tuple, class... _Types1, class... _Tuples> -struct __tuple_cat_return_impl, _Tuple<_Types1...>, _Tuples...> +template +struct __tuple_cat_return_impl, tuple<_Types1...>, _Tuples...> : __tuple_cat_return_impl, _Tuples...> {}; +template +struct __tuple_cat_return_impl, pair<_Tp, _Up>, _Tuples...> + : __tuple_cat_return_impl, _Tuples...> {}; + template struct __tuple_cat_array; @@ -1369,11 +1372,7 @@ __tuple_cat_select_element_wise(_TupleSrc&& __src, __index_sequence<_Indices...> return _TupleDst(std::get<_Indices>(std::forward<_TupleSrc>(__src))...); } -template >, __tuple_like_ext<__remove_cvref_t<_Tuples>>...>::value, - int> = 0> +template inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __tuple_cat_return_t<_Tuple0, _Tuples...> tuple_cat(_Tuple0&& __t0, _Tuples&&... __tpls) { using _T0 _LIBCPP_NODEBUG = __libcpp_remove_reference_t<_Tuple0>;