This has multiple benefits:
- The optimizations are also performed for the ranges:: versions of the algorithms
- Code duplication is reduced
- it is simpler to add this optimization for other segmented iterators, like ranges::join_view::iterator
- Algorithm code is removed from <deque>
sentinel is always copyable.
this applies for other places