[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.
This commit is contained in:
@@ -684,7 +684,7 @@ public:
|
||||
template <class _Rp, class... _Ap>
|
||||
function(_Rp (*)(_Ap...)) -> function<_Rp(_Ap...)>;
|
||||
|
||||
template <class _Fp, class _Stripped = typename __strip_signature<decltype(&_Fp::operator())>::type>
|
||||
template <class _Fp, class _Stripped = __strip_signature_t<decltype(&_Fp::operator())>>
|
||||
function(_Fp) -> function<_Stripped>;
|
||||
# endif // _LIBCPP_STD_VER >= 17
|
||||
|
||||
|
||||
@@ -74,6 +74,9 @@ template<class _Rp, class _Gp, class ..._Ap>
|
||||
struct __strip_signature<_Rp (_Gp::*) (_Ap...) const volatile & noexcept> { using type _LIBCPP_NODEBUG = _Rp(_Ap...); };
|
||||
// clang-format on
|
||||
|
||||
template <class _Fp>
|
||||
using __strip_signature_t _LIBCPP_NODEBUG = typename __strip_signature<_Fp>::type;
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#endif // _LIBCPP_STD_VER >= 17
|
||||
|
||||
@@ -1749,7 +1749,7 @@ public:
|
||||
template <class _Rp, class... _Args>
|
||||
packaged_task(_Rp (*)(_Args...)) -> packaged_task<_Rp(_Args...)>;
|
||||
|
||||
template <class _Fp, class _Stripped = typename __strip_signature<decltype(&_Fp::operator())>::type>
|
||||
template <class _Fp, class _Stripped = __strip_signature_t<decltype(&_Fp::operator())>>
|
||||
packaged_task(_Fp) -> packaged_task<_Stripped>;
|
||||
|
||||
# endif
|
||||
|
||||
Reference in New Issue
Block a user