4#ifndef TETL_ALGORITHM_PARTITION_HPP
5#define TETL_ALGORITHM_PARTITION_HPP
7#include <etl/_algorithm/find_if_not.hpp>
8#include <etl/_algorithm/iter_swap.hpp>
9#include <etl/_iterator/next.hpp>
18template <
typename ForwardIt,
typename Predicate>
19constexpr auto partition(ForwardIt first, ForwardIt last, Predicate p) -> ForwardIt
21 first =
etl::find_if_not(first, last, p);
26 for (ForwardIt i =
etl::next(first); i != last; ++i) {
28 etl::iter_swap(i, first);
constexpr auto partition(ForwardIt first, ForwardIt last, Predicate p) -> ForwardIt
Reorders the elements in the range [first, last) in such a way that all elements for which the predic...
Definition partition.hpp:19
Definition adjacent_find.hpp:9