From f4f70258d01890a514ddc5b81028792834bb90b8 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Mon, 1 Sep 2025 18:03:27 +0200 Subject: [PATCH] [libc++] Simplify further --- libcxx/include/CMakeLists.txt | 1 - libcxx/include/__fwd/tuple.h | 3 + libcxx/include/__tuple/make_tuple_types.h | 77 ---------------------- libcxx/include/__tuple/tuple_element.h | 11 ---- libcxx/include/__tuple/tuple_like_ext.h | 11 ---- libcxx/include/__tuple/tuple_size.h | 3 - libcxx/include/module.modulemap.in | 1 - libcxx/include/tuple | 78 ++++++++++------------- 8 files changed, 38 insertions(+), 147 deletions(-) delete mode 100644 libcxx/include/__tuple/make_tuple_types.h diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt index 1f91b4828d4d3..f2f1ec50d5b75 100644 --- a/libcxx/include/CMakeLists.txt +++ b/libcxx/include/CMakeLists.txt @@ -778,7 +778,6 @@ set(files __tree __tuple/find_index.h __tuple/ignore.h - __tuple/make_tuple_types.h __tuple/sfinae_helpers.h __tuple/tuple_element.h __tuple/tuple_like.h diff --git a/libcxx/include/__fwd/tuple.h b/libcxx/include/__fwd/tuple.h index b3cac4e2a633d..dc96c03e2024f 100644 --- a/libcxx/include/__fwd/tuple.h +++ b/libcxx/include/__fwd/tuple.h @@ -21,6 +21,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD template struct tuple_element; +template +using __tuple_element_t _LIBCPP_NODEBUG = typename tuple_element<_Np, _Tp>::type; + #ifndef _LIBCPP_CXX03_LANG template diff --git a/libcxx/include/__tuple/make_tuple_types.h b/libcxx/include/__tuple/make_tuple_types.h deleted file mode 100644 index 3c22ec85dc9c7..0000000000000 --- a/libcxx/include/__tuple/make_tuple_types.h +++ /dev/null @@ -1,77 +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_MAKE_TUPLE_TYPES_H -#define _LIBCPP___TUPLE_MAKE_TUPLE_TYPES_H - -#include <__config> -#include <__cstddef/size_t.h> -#include <__fwd/array.h> -#include <__fwd/tuple.h> -#include <__tuple/tuple_element.h> -#include <__tuple/tuple_size.h> -#include <__tuple/tuple_types.h> -#include <__type_traits/copy_cvref.h> -#include <__type_traits/remove_cvref.h> -#include <__type_traits/remove_reference.h> -#include <__utility/integer_sequence.h> - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif - -#ifndef _LIBCPP_CXX03_LANG - -_LIBCPP_BEGIN_NAMESPACE_STD - -// __make_tuple_types<_Tuple<_Types...>, _Ep, _Sp>::type is a -// __tuple_types<_Types...> using only those _Types in the range [_Sp, _Ep). -// _Sp defaults to 0 and _Ep defaults to tuple_size<_Tuple>. If _Tuple is a -// lvalue_reference type, then __tuple_types<_Types&...> is the result. - -template -struct __make_tuple_types_flat; - -template