Skip to content

Commit

Permalink
chore: regenerate cpp bindings with new cxx library
Browse files Browse the repository at this point in the history
  • Loading branch information
nikgraf committed Oct 3, 2023
1 parent 09e9935 commit ff1d9d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cpp/opaque-rust.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,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
3 changes: 2 additions & 1 deletion cpp/opaque-rust.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,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 ff1d9d6

Please sign in to comment.