|
22 | 22 | #include <__type_traits/is_same.h>
|
23 | 23 | #include <__type_traits/is_void.h>
|
24 | 24 | #include <__type_traits/nat.h>
|
| 25 | +#include <__type_traits/type_identity.h> |
25 | 26 | #include <__type_traits/void_t.h>
|
26 | 27 | #include <__utility/declval.h>
|
27 | 28 | #include <__utility/forward.h>
|
@@ -67,20 +68,20 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
67 | 68 |
|
68 | 69 | #if __has_builtin(__builtin_invoke)
|
69 | 70 |
|
70 |
| -template <class... _Args> |
71 |
| -using __invoke_result_t _LIBCPP_NODEBUG = decltype(__builtin_invoke(std::declval<_Args>()...)); |
72 |
| - |
73 | 71 | template <class, class... _Args>
|
74 | 72 | struct __invoke_result_impl {};
|
75 | 73 |
|
76 | 74 | template <class... _Args>
|
77 |
| -struct __invoke_result_impl<__void_t<__invoke_result_t<_Args...> >, _Args...> { |
78 |
| - using type _LIBCPP_NODEBUG = __invoke_result_t<_Args...>; |
| 75 | +struct __invoke_result_impl<__void_t<decltype(__builtin_invoke(std::declval<_Args...>()))>, _Args...> { |
| 76 | + using type _LIBCPP_NODEBUG = decltype(__builtin_invoke(std::declval<_Args...>())); |
79 | 77 | };
|
80 | 78 |
|
81 | 79 | template <class... _Args>
|
82 | 80 | using __invoke_result _LIBCPP_NODEBUG = __invoke_result_impl<void, _Args...>;
|
83 | 81 |
|
| 82 | +template <class... _Args> |
| 83 | +using __invoke_result_t _LIBCPP_NODEBUG = typename __invoke_result<_Args...>::type; |
| 84 | + |
84 | 85 | template <class... _Args>
|
85 | 86 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __invoke_result_t<_Args...> __invoke(_Args&&... __args)
|
86 | 87 | _NOEXCEPT_(noexcept(__builtin_invoke(std::forward<_Args>(__args)...))) {
|
|
0 commit comments