Skip to content

Commit

Permalink
Fix unqualified calls to __swallow
Browse files Browse the repository at this point in the history
Fixes [BUG]: libcudacxx clashes w/ libc++: ambiguous overload resolution for `__swallow` #1678
  • Loading branch information
miscco committed May 6, 2024
1 parent 3528a89 commit c5cbfd2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions libcudacxx/include/cuda/std/detail/libcxx/include/tuple
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ struct _LIBCUDACXX_DECLSPEC_EMPTY_BASES __tuple_impl<__tuple_indices<_Indx...>,
_LIBCUDACXX_INLINE_VISIBILITY __tuple_impl& operator=(_Tuple&& __t) noexcept(
(__all<_LIBCUDACXX_TRAIT(is_nothrow_assignable, _Tp&, __tuple_elem_at<_Tuple, _Indx>)...>::value))
{
__swallow(__tuple_leaf<_Indx, _Tp>::operator=(
_CUDA_VSTD::__swallow(__tuple_leaf<_Indx, _Tp>::operator=(
_CUDA_VSTD::forward<__tuple_elem_at<_Tuple, _Indx>>(_CUDA_VSTD::get<_Indx>(__t)))...);
return *this;
}
Expand All @@ -505,22 +505,23 @@ struct _LIBCUDACXX_DECLSPEC_EMPTY_BASES __tuple_impl<__tuple_indices<_Indx...>,
_LIBCUDACXX_INLINE_VISIBILITY __tuple_impl&
operator=(const __tuple_impl& __t) noexcept((__all<_LIBCUDACXX_TRAIT(is_nothrow_copy_assignable, _Tp)...>::value))
{
__swallow(__tuple_leaf<_Indx, _Tp>::operator=(static_cast<const __tuple_leaf<_Indx, _Tp>&>(__t).get())...);
_CUDA_VSTD::__swallow(
__tuple_leaf<_Indx, _Tp>::operator=(static_cast<const __tuple_leaf<_Indx, _Tp>&>(__t).get())...);
return *this;
}

_LIBCUDACXX_INLINE_VISIBILITY __tuple_impl&
operator=(__tuple_impl&& __t) noexcept((__all<_LIBCUDACXX_TRAIT(is_nothrow_move_assignable, _Tp)...>::value))
{
__swallow(__tuple_leaf<_Indx, _Tp>::operator=(
_CUDA_VSTD::__swallow(__tuple_leaf<_Indx, _Tp>::operator=(
_CUDA_VSTD::forward<_Tp>(static_cast<__tuple_leaf<_Indx, _Tp>&>(__t).get()))...);
return *this;
}

_LIBCUDACXX_INLINE_VISIBILITY void
swap(__tuple_impl& __t) noexcept(__all<__is_nothrow_swappable<_Tp>::value...>::value)
{
__swallow(__tuple_leaf<_Indx, _Tp>::swap(static_cast<__tuple_leaf<_Indx, _Tp>&>(__t))...);
_CUDA_VSTD::__swallow(__tuple_leaf<_Indx, _Tp>::swap(static_cast<__tuple_leaf<_Indx, _Tp>&>(__t))...);
}
};

Expand Down

0 comments on commit c5cbfd2

Please sign in to comment.