Skip to content

Commit

Permalink
chore: update cxx.h header
Browse files Browse the repository at this point in the history
  • Loading branch information
flxzt committed Apr 21, 2024
1 parent 137bee7 commit 457b1e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/rust/cxx.h
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,8 @@ typename Slice<T>::iterator::difference_type
Slice<T>::iterator::operator-(const iterator &other) const noexcept {
auto diff = std::distance(static_cast<char *>(other.pos),
static_cast<char *>(this->pos));
return diff / this->stride;
return diff / static_cast<typename Slice<T>::iterator::difference_type>(
this->stride);
}

template <typename T>
Expand Down

0 comments on commit 457b1e0

Please sign in to comment.