We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 639401d commit dfda487Copy full SHA for dfda487
include/interval-tree/interval_tree.hpp
@@ -885,14 +885,20 @@ namespace lib_interval_tree
885
if (!iter.node_)
886
throw std::out_of_range("cannot erase end iterator");
887
888
- auto next = iter;
889
- ++next;
+ iterator next = iter;
890
891
node_type* y;
892
if (!iter.node_->left_ || !iter.node_->right_)
+ {
893
y = iter.node_;
894
+ ++next;
895
+ }
896
else
897
898
y = successor(iter.node_);
899
+ next = iterator{y, this};
900
901
902
903
node_type* x;
904
if (y->left_)
0 commit comments