Skip to content

Commit

Permalink
give msvc a hand
Browse files Browse the repository at this point in the history
  • Loading branch information
ericniebler committed Nov 10, 2024
1 parent 4e56cb1 commit 9ec5a9f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libcudacxx/include/cuda/std/__utility/declval.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD
// is available. It compiles approximately 2x faster than the fallback.
#if !defined(_CCCL_NO_VARIABLE_TEMPLATES)

template <class _Tp>
using __typename_t _LIBCUDACXX_NODEBUG_TYPE = _Tp;

template <class _Tp, class = void>
extern void (*declval)() noexcept;
extern __typename_t<void (*)() noexcept> declval;

template <class _Tp>
extern _Tp && (*declval<_Tp, void_t<_Tp&&>>) () noexcept;
extern __typename_t<_Tp && (*) () noexcept> declval<_Tp, void_t<_Tp&&>>;

#else // ^^^ !_CCCL_NO_VARIABLE_TEMPLATES ^^^ / vvv _CCCL_NO_VARIABLE_TEMPLATES vvv

Expand Down

0 comments on commit 9ec5a9f

Please sign in to comment.