Skip to content

Commit 995d04b

Browse files
committed
Oops, bad tracking of displacement on stride_counting_iterator
1 parent faa3115 commit 995d04b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libcxx/test/support/test_iterators.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ class stride_counting_iterator {
826826
It tmp(base_);
827827
base_ = base(tmp += n);
828828
++*stride_count_;
829-
++*stride_displacement_;
829+
*stride_displacement_ += n;
830830
return *this;
831831
}
832832

@@ -836,7 +836,7 @@ class stride_counting_iterator {
836836
It tmp(base_);
837837
base_ = base(tmp -= n);
838838
++*stride_count_;
839-
--*stride_displacement_;
839+
*stride_displacement_ -= n;
840840
return *this;
841841
}
842842

0 commit comments

Comments
 (0)