Skip to content

Commit

Permalink
More evil fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
miscco committed Jan 22, 2025
1 parent 66fd8d4 commit 89dfd9c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions libcudacxx/include/cuda/std/__mdspan/extents.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,27 @@ struct __possibly_empty_array<_Tp, 0>
{
_LIBCUDACXX_HIDE_FROM_ABI constexpr _Tp& operator[](size_t)
{
# if _CCCL_COMPILER(MSVC)
return *__get_fake_ptr();
# else // ^^^ _CCCL_COMPILER(MSVC) ^^^ / vvv !_CCCL_COMPILER(MSVC) vvv
_CCCL_UNREACHABLE();
# endif // !_CCCL_COMPILER(MSVC)
}
_LIBCUDACXX_HIDE_FROM_ABI constexpr const _Tp& operator[](size_t) const
{
# if _CCCL_COMPILER(MSVC)
return *__get_fake_ptr();
# else // ^^^ _CCCL_COMPILER(MSVC) ^^^ / vvv !_CCCL_COMPILER(MSVC) vvv
_CCCL_UNREACHABLE();
# endif // !_CCCL_COMPILER(MSVC)
}

# if _CCCL_COMPILER(MSVC)
_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr _Tp* __get_fake_ptr() noexcept
{
return nullptr;
}
# endif // _CCCL_COMPILER(MSVC)
};

// ------------------------------------------------------------------
Expand Down

0 comments on commit 89dfd9c

Please sign in to comment.