fix reverse_iterator

support STL container: some algorithms
This commit is contained in:
bolero-MURAKAMI 2013-01-20 08:53:20 +09:00
parent a9cd556f8e
commit 9a593cbb81
30 changed files with 634 additions and 78 deletions

View file

@ -178,14 +178,14 @@ namespace sprout {
SPROUT_CONSTEXPR remake_iterator next() const {
return remake_iterator(
sprout::next(current), (is_in_copying() ? sprout::next(current2) : current2),
fst, last,
fst, lst,
begin_off - 1, end_off - 1
);
}
SPROUT_CONSTEXPR remake_iterator prev() const {
return remake_iterator(
sprout::prev(current), (begin_off < 0 && end_off >= 0 ? sprout::prev(current2) : current2),
fst, last,
fst, lst,
begin_off + 1, end_off + 1
);
}