mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-04 14:14:09 +00:00
fix alternate_iterator
This commit is contained in:
parent
ca4fdcdbae
commit
e588c4925a
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ namespace sprout {
|
||||||
bool in_left;
|
bool in_left;
|
||||||
private:
|
private:
|
||||||
SPROUT_CONSTEXPR alternate_iterator advance_impl_1(difference_type n) const {
|
SPROUT_CONSTEXPR alternate_iterator advance_impl_1(difference_type n) const {
|
||||||
return alternate_iterator(sprout::next(current1, n / 2), sprout::next(current2, n / 2), n % 2);
|
return alternate_iterator(sprout::next(current1, n / 2), sprout::next(current2, n / 2), !(n % 2));
|
||||||
}
|
}
|
||||||
SPROUT_CONSTEXPR alternate_iterator advance_impl(difference_type n) const {
|
SPROUT_CONSTEXPR alternate_iterator advance_impl(difference_type n) const {
|
||||||
return advance_impl_1(n + (!is_in_left() ? 1 : 0));
|
return advance_impl_1(n + (!is_in_left() ? 1 : 0));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue