4#ifndef TETL_ALGORITHM_INCLUDES_HPP
5#define TETL_ALGORITHM_INCLUDES_HPP
7#include <etl/_functional/less.hpp>
14template <
typename InputIt1,
typename InputIt2,
typename Compare>
15[[nodiscard]]
constexpr auto includes(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, Compare comp)
18 for (; first2 != last2; ++first1) {
19 if (first1 == last1
or comp(*first2, *first1)) {
22 if (
not comp(*first1, *first2)) {
30template <
typename InputIt1,
typename InputIt2>
31[[nodiscard]]
constexpr auto includes(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2) ->
bool
33 return etl::includes(first1, last1, first2, last2,
etl::
less());
constexpr auto includes(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, Compare comp) -> bool
Returns true if the sorted range [first2, last2) is a subsequence of the sorted range [first1,...
Definition includes.hpp:15
constexpr auto includes(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2) -> bool
Definition includes.hpp:31
Definition adjacent_find.hpp:9
Function object for performing comparisons. Unless specialised, invokes operator< on type T....
Definition less.hpp:15