Skip to content

Commit a71647f

Browse files
committed
Add operator-= as random access iterators need to provide that feature.
An updated std::sort algorithm is relying on it. Context: llvm/llvm-project@4eddbf9 Signed-off-by: Henner Zeller <hzeller@google.com>
1 parent 76b8da2 commit a71647f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libs/librrgraph/src/base/rr_graph_storage.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,11 @@ class edge_sort_iterator {
160160
return *this;
161161
}
162162

163+
edge_sort_iterator& operator-=(ssize_t n) {
164+
swapper_.idx_ -= n;
165+
return *this;
166+
}
167+
163168
edge_sort_iterator& operator++() {
164169
++swapper_.idx_;
165170
return *this;

0 commit comments

Comments
 (0)