Skip to content

Commit

Permalink
Update single header
Browse files Browse the repository at this point in the history
  • Loading branch information
tcbrindle authored and github-actions[bot] committed Jan 9, 2024
1 parent 531a249 commit c3e04d5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions single_include/flux.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4273,7 +4273,7 @@ struct adjacent_sequence_traits_base {
{
cursor_type out{flux::first(self.base_), };

for (auto i : flux::ints(1, N)) {
for (auto i : flux::iota(std::size_t{1}, std::size_t{N})) {
out.arr[i] = out.arr[i - 1];
if (!flux::is_last(self.base_, out.arr[i])) {
flux::inc(self.base_, out.arr[i]);
Expand All @@ -4300,7 +4300,7 @@ struct adjacent_sequence_traits_base {
cursor_type out{};
out.arr.back() = flux::last(self.base_);
auto const first = flux::first(self.base_);
for (auto i : flux::ints(0, N-1).reverse()) {
for (auto i : flux::iota(std::size_t{0}, std::size_t{N}-1).reverse()) {
out.arr[i] = out.arr[i + 1];
if (out.arr[i] != first) {
flux::dec(self.base_, out.arr[i]);
Expand Down Expand Up @@ -7174,7 +7174,7 @@ struct cycle_adaptor : inline_sequence_base<cycle_adaptor<Base, IsInfinite>> {
auto off = flux::distance(self.base_, first, cur.base_cur);
off = num::checked_add(off, offset);

cur.n += off/sz;
cur.n += static_cast<std::size_t>(off/sz);

off = off % sz;
if (off < 0) {
Expand Down Expand Up @@ -12987,7 +12987,7 @@ struct repeat_sequence : inline_sequence_base<repeat_sequence<T, IsInfinite>>

static constexpr auto inc(self_t const&, std::size_t& cur, distance_t offset) -> void
{
cur += offset;
cur += static_cast<std::size_t>(offset);
}

static constexpr auto distance(self_t const&, std::size_t from, std::size_t to) -> distance_t
Expand Down Expand Up @@ -13025,7 +13025,7 @@ struct repeat_sequence : inline_sequence_base<repeat_sequence<T, IsInfinite>>
static constexpr auto size(self_t const& self) -> distance_t
requires (!IsInfinite)
{
return self.data_.count;
return checked_cast<distance_t>(self.data_.count);
}
};
};
Expand Down

0 comments on commit c3e04d5

Please sign in to comment.