Skip to content

Commit c50ab47

Browse files
committed
Support sentinels in erase_after
1 parent 2ddd0e3 commit c50ab47

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/containers/algorithms/erase.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import containers.count_type;
2020
import containers.erase_concepts;
2121
import containers.iterator_t;
2222
import containers.mutable_iterator;
23+
import containers.sentinel_for;
2324
import containers.size;
2425
import containers.splicable;
2526
import containers.subrange;
@@ -119,7 +120,7 @@ constexpr auto erase_if(Container & container, auto predicate) -> count_type<Con
119120
}
120121

121122
export template<has_member_erase_after Container>
122-
constexpr auto erase_after(Container & container, iterator_t<Container const &> const before_first, iterator_t<Container const &> const last) -> void {
123+
constexpr auto erase_after(Container & container, iterator_t<Container const &> const before_first, sentinel_for<iterator_t<Container const &>> auto const last) -> void {
123124
auto it = containers::next(before_first);
124125
while (it != last) {
125126
it = container.erase_after(before_first);

0 commit comments

Comments
 (0)