Skip to content

Commit

Permalink
fixes issue Dobiasd#119 (adjacent_pairs)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobiasd committed Feb 14, 2018
1 parent 10aaa11 commit 0dc56fc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions include/fplus/pairs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,13 @@ ContainerOut adjacent_pairs(const Container& xs)
internal::advance_iterator(it2, 1);
const auto it_source_end =
internal::add_to_iterator(std::begin(xs), out_size + out_size);
for (; it1 != it_source_end;
internal::advance_iterator(it1, 2),
internal::advance_iterator(it2, 2))
for (;;)
{
*itOut = std::make_pair(*it1, *it2);
internal::advance_iterator(it1, 2);
if (it1 == it_source_end)
break;
internal::advance_iterator(it2, 2);
}
return result;
}
Expand Down

0 comments on commit 0dc56fc

Please sign in to comment.