Skip to content

Commit

Permalink
Adding a conditional explicit in converting constructor of RandomAcce…
Browse files Browse the repository at this point in the history
…ssIterator
  • Loading branch information
Yuuichi Asahi committed Apr 12, 2024
1 parent ee42c6d commit 2387dde
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ class RandomAccessIterator< ::Kokkos::View<DataType, Args...> > {
template <
class ViewType,
std::enable_if_t<std::is_constructible_v<view_type, ViewType>, int> = 0>
KOKKOS_FUNCTION RandomAccessIterator(
const RandomAccessIterator<ViewType>& other)
KOKKOS_IMPL_CONDITIONAL_EXPLICIT(
(!std::is_convertible_v<ViewType, view_type>::value))
KOKKOS_FUNCTION
RandomAccessIterator(const RandomAccessIterator<ViewType>& other)
: m_view(other.m_view), m_current_index(other.m_current_index) {}

KOKKOS_FUNCTION
Expand Down

0 comments on commit 2387dde

Please sign in to comment.