13 struct ShiftRightFunction {
14 template<concepts::Permutable It, concepts::SentinelFor<It> Sent>
22 if constexpr (concepts::BidirectionalIterator<It>) {
24 auto new_start = last_it;
27 if (new_start == first) {
28 return { last_it, last_it };
33 return { real_start, last_it };
35 auto new_start =
first;
37 if (new_start == last) {
38 return { new_start, new_start };
45 auto fast = new_start;
51 for (; slow != new_start; ++fast, ++slow) {
54 return { new_start, result.out };
66 for (
auto pending = first; pending != new_start; ++fast, ++slow, ++pending) {
73 return { new_start, last_it };
85 template<concepts::ForwardContainer Con>
86 requires(concepts::Permutable<meta::ContainerIterator<Con>>)
93constexpr inline auto shift_right = detail::ShiftRightFunction {};
#define DI_ASSERT(...)
Definition assert_bool.h:7
constexpr auto first(concepts::detail::ConstantVector auto &vector, size_t count)
Definition vector_first.h:13
constexpr auto shift_right
Definition shift_right.h:93
constexpr auto next
Definition next.h:35
constexpr auto move
Definition move.h:38
View(Iter, Sent) -> View< Iter, Sent >
constexpr auto iterator_swap
Definition iterator_swap.h:49
constexpr auto move_backward
Definition move_backward.h:34
constexpr auto end
Definition end.h:55
constexpr auto advance
Definition advance.h:62
constexpr auto begin
Definition begin.h:52
Definition any_storable.h:9