From 832517f28d4b47bb03d7a310d99279552da2aa8d Mon Sep 17 00:00:00 2001 From: William Fynn Date: Fri, 6 Mar 2026 17:49:39 +0000 Subject: [PATCH] [libc++] Add alias template for __strip_signature::type (#181955) Simplifying the internal implementation by providing a more concise way to access the underlying type within the __strip_signature class. --- libcxx/include/__functional/function.h | 2 +- libcxx/include/__type_traits/strip_signature.h | 3 +++ libcxx/include/future | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h index c1675879ec19..d3a978ac862d 100644 --- a/libcxx/include/__functional/function.h +++ b/libcxx/include/__functional/function.h @@ -684,7 +684,7 @@ public: template function(_Rp (*)(_Ap...)) -> function<_Rp(_Ap...)>; -template ::type> +template > function(_Fp) -> function<_Stripped>; # endif // _LIBCPP_STD_VER >= 17 diff --git a/libcxx/include/__type_traits/strip_signature.h b/libcxx/include/__type_traits/strip_signature.h index c8b33278737e..1ff5b3d9ec62 100644 --- a/libcxx/include/__type_traits/strip_signature.h +++ b/libcxx/include/__type_traits/strip_signature.h @@ -74,6 +74,9 @@ template struct __strip_signature<_Rp (_Gp::*) (_Ap...) const volatile & noexcept> { using type _LIBCPP_NODEBUG = _Rp(_Ap...); }; // clang-format on +template +using __strip_signature_t _LIBCPP_NODEBUG = typename __strip_signature<_Fp>::type; + _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 17 diff --git a/libcxx/include/future b/libcxx/include/future index 4084148e52af..6bd836afa04e 100644 --- a/libcxx/include/future +++ b/libcxx/include/future @@ -1749,7 +1749,7 @@ public: template packaged_task(_Rp (*)(_Args...)) -> packaged_task<_Rp(_Args...)>; -template ::type> +template > packaged_task(_Fp) -> packaged_task<_Stripped>; # endif