Commit 1dbbe8f
committed
use ranges::unique and ranges::partition for full-range calls
Convert the remaining full-range std algorithm calls to their ranges::
equivalents:
- virtual_tree: unique(all(subset)) -> begin(ranges::unique(subset))
- edge_cd: partition(all(g[u]), ...) -> begin(ranges::partition(g[u], ...))
ranges::unique / ranges::partition return a subrange, so begin(...) yields
the iterator the erase / offset logic needs.
Partial-range calls (iterator sub-ranges) and std::partial_sum are still
left as-is: partial_sum has no ranges equivalent, and partial ranges read
more clearly with explicit iterators.1 parent bcc3b76 commit 1dbbe8f
2 files changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
0 commit comments