4#ifndef TETL_ALGORITHM_ROTATE_HPP
5#define TETL_ALGORITHM_ROTATE_HPP
7#include <etl/_algorithm/iter_swap.hpp>
17template <
typename ForwardIt>
18constexpr auto rotate(ForwardIt first, ForwardIt nFirst, ForwardIt last) -> ForwardIt
20 if (first == nFirst) {
30 auto nextRead = first;
32 while (read != last) {
33 if (write == nextRead) {
36 etl::iter_swap(write++, read++);
44 while (first != nFirst) {
49 while (read != last) {
50 if (write == nextRead) {
53 etl::iter_swap(write++, read++);
constexpr auto rotate(ForwardIt first, ForwardIt nFirst, ForwardIt last) -> ForwardIt
Performs a left rotation on a range of elements.
Definition rotate.hpp:18
Definition adjacent_find.hpp:9