Skip to content

Commit

Permalink
Fix merge conflict from incoming PR (#1250)
Browse files Browse the repository at this point in the history
  • Loading branch information
miscco committed Jan 5, 2024
1 parent 50ce545 commit 8c0bd44
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,24 @@
#endif // no system header
_LIBCUDACXX_BEGIN_NAMESPACE_RANGES

#if _LIBCUDACXX_STD_VER > 14
#if _CCCL_STD_VER >= 2017

struct view_base { };

_LIBCUDACXX_BEGIN_NAMESPACE_RANGES_ABI

#if _LIBCUDACXX_STD_VER > 17
#if _CCCL_STD_VER >= 2020

template<class _Derived>
requires is_class_v<_Derived> && same_as<_Derived, remove_cv_t<_Derived>>
class view_interface;

#else
#else // ^^^ _CCCL_STD_VER >= 2020 ^^^ / vvv _CCCL_STD_VER <= 2017 vvv

template<class _Derived, enable_if_t<is_class_v<_Derived> && same_as<_Derived, remove_cv_t<_Derived>>, int> = 0>
class view_interface;

#endif // _LIBCUDACXX_STD_VER < 17
#endif // _CCCL_STD_VER <= 2017

_LIBCUDACXX_END_NAMESPACE_RANGES_ABI

Expand All @@ -57,23 +57,23 @@ _LIBCUDACXX_TEMPLATE(class _Op, class _Yp)
_LIBCUDACXX_INLINE_VISIBILITY
void __is_derived_from_view_interface(const _Op*, const view_interface<_Yp>*);

#if _LIBCUDACXX_STD_VER > 17
#if _CCCL_STD_VER >= 2020

template <class _Tp>
_LIBCUDACXX_INLINE_VAR constexpr bool enable_view = derived_from<_Tp, view_base> ||
requires { _CUDA_VRANGES::__is_derived_from_view_interface((_Tp*)nullptr, (_Tp*)nullptr); };

#else
#else // ^^^ _CCCL_STD_VER >= 2020 ^^^ / vvv _CCCL_STD_VER <= 2017 vvv

template <class _Tp, class = void>
_LIBCUDACXX_INLINE_VAR constexpr bool enable_view = derived_from<_Tp, view_base>;

template <class _Tp>
_LIBCUDACXX_INLINE_VAR constexpr bool enable_view<_Tp,
void_t<decltype(_CUDA_VRANGES::__is_derived_from_view_interface((_Tp*)nullptr, (_Tp*)nullptr))>> = true;
#endif // _LIBCUDACXX_STD_VER < 17
#endif // _CCCL_STD_VER <= 2017

#endif // _LIBCUDACXX_STD_VER > 14
#endif // _CCCL_STD_VER >= 2017

_LIBCUDACXX_END_NAMESPACE_RANGES

Expand Down

0 comments on commit 8c0bd44

Please sign in to comment.