Skip to content

Commit

Permalink
[skip-tests] Use builtin for destructible concept on MSVC (#333)
Browse files Browse the repository at this point in the history
MSVC has issues with private destructors, so just use the builtin it provides.

This addresses nvbug200707001
  • Loading branch information
miscco authored Aug 15, 2023
1 parent 124ff48 commit d70a624
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD

#if _LIBCUDACXX_STD_VER > 11

#if defined(_LIBCUDACXX_COMPILER_MSVC)

template<class _Tp>
_LIBCUDACXX_CONCEPT destructible = __is_nothrow_destructible(_Tp);

#else // ^^^ _LIBCUDACXX_COMPILER_MSVC ^^^ / vvv !_LIBCUDACXX_COMPILER_MSVC vvv

template<class _Tp, class = void, class = void>
_LIBCUDACXX_INLINE_VAR constexpr bool __destructible_impl = false;

Expand Down Expand Up @@ -58,6 +65,8 @@ _LIBCUDACXX_INLINE_VAR constexpr bool __destructible<_Tp[_Nm]> = __destructible<
template<class _Tp>
_LIBCUDACXX_CONCEPT destructible = __destructible<_Tp>;

#endif // !_LIBCUDACXX_COMPILER_MSVC

#endif // _LIBCUDACXX_STD_VER > 11

_LIBCUDACXX_END_NAMESPACE_STD
Expand Down

0 comments on commit d70a624

Please sign in to comment.