Skip to content

Commit

Permalink
cast ptrdiff to fix macos again
Browse files Browse the repository at this point in the history
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
  • Loading branch information
mgovers committed Oct 12, 2023
1 parent b5fa5aa commit 38dcf69
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,9 @@ class DenseGroupedIdxVector {

auto dereference() const -> iterator {
assert(dense_vector_ != nullptr);
return boost::counting_range(std::distance(std::cbegin(*dense_vector_), group_range_.first),
std::distance(std::cbegin(*dense_vector_), group_range_.second));
return boost::counting_range(
detail::narrow_cast<Idx>(std::distance(std::cbegin(*dense_vector_), group_range_.first)),
detail::narrow_cast<Idx>(std::distance(std::cbegin(*dense_vector_), group_range_.second)));
}
constexpr auto equal(GroupIterator const& other) const { return group_ == other.group_; }
constexpr auto distance_to(GroupIterator const& other) const { return other.group_ - group_; }
Expand Down

0 comments on commit 38dcf69

Please sign in to comment.