File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
libcudacxx/include/cuda/std/__type_traits Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 2020# pragma system_header
2121#endif // no system header
2222
23- #include < cuda/std/__type_traits/integral_constant .h>
23+ #include < cuda/std/__type_traits/is_valid_expansion .h>
2424#include < cuda/std/__utility/declval.h>
2525
2626_LIBCUDACXX_BEGIN_NAMESPACE_STD
2727
28- template <class _Func , class ... _Args, class = decltype (_CUDA_VSTD::declval<_Func>()(_CUDA_VSTD::declval<_Args>()...))>
29- _LIBCUDACXX_HIDE_FROM_ABI true_type __is_callable_helper (int );
30- template <class ...>
31- _LIBCUDACXX_HIDE_FROM_ABI false_type __is_callable_helper (...);
28+ template <class _Func , class ... _Args>
29+ using __call_result_t = decltype (_CUDA_VSTD::declval<_Func>()(_CUDA_VSTD::declval<_Args>()...));
3230
3331template <class _Func , class ... _Args>
34- struct __is_callable : decltype (__is_callable_helper< _Func, _Args...>( 0 ))
32+ struct __is_callable : _IsValidExpansion< __call_result_t , _Func, _Args...>
3533{};
3634
3735#ifndef _CCCL_NO_VARIABLE_TEMPLATES
3836template <class _Func , class ... _Args>
39- _CCCL_INLINE_VAR constexpr bool __is_callable_v = decltype (__is_callable_helper< _Func, _Args...>( 0 )) ::value;
37+ _CCCL_INLINE_VAR constexpr bool __is_callable_v = _IsValidExpansion< __call_result_t , _Func, _Args...>::value;
4038#endif // !_CCCL_NO_VARIABLE_TEMPLATES
4139
4240_LIBCUDACXX_END_NAMESPACE_STD
You can’t perform that action at this time.
0 commit comments