aboutsummaryrefslogtreecommitdiff
path: root/include/cxx.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/cxx.h')
-rw-r--r--include/cxx.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/cxx.h b/include/cxx.h
index 907ee829..00228255 100644
--- a/include/cxx.h
+++ b/include/cxx.h
@@ -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>