Skip to content

Commit

Permalink
add __is_callable_v variable template when possible (#2598)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericniebler authored Oct 18, 2024
1 parent 8821917 commit 084cd53
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libcudacxx/include/cuda/std/__type_traits/is_callable.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ template <class _Func, class... _Args>
struct __is_callable : decltype(__is_callable_helper<_Func, _Args...>(0))
{};

#ifndef _CCCL_NO_VARIABLE_TEMPLATES
template <class _Func, class... _Args>
_CCCL_INLINE_VAR constexpr bool __is_callable_v = decltype(__is_callable_helper<_Func, _Args...>(0))::value;
#endif // !_CCCL_NO_VARIABLE_TEMPLATES

_LIBCUDACXX_END_NAMESPACE_STD

#endif // _LIBCUDACXX___TYPE_TRAITS_IS_CALLABLE_H

0 comments on commit 084cd53

Please sign in to comment.