4#ifndef TETL_ALGORITHM_MISMATCH_HPP
5#define TETL_ALGORITHM_MISMATCH_HPP
7#include <etl/_utility/pair.hpp>
25template <
typename InputIt1,
typename InputIt2,
typename Predicate>
26[[nodiscard]]
constexpr auto mismatch(InputIt1 first1, InputIt1 last1, InputIt2 first2, Predicate pred)
27 ->
pair<InputIt1, InputIt2>
29 for (; first1 != last1; ++first1, (
void)++first2) {
30 if (
not pred(*first1, *first2)) {
35 return {first1, first2};
38template <
typename InputIt1,
typename InputIt2>
39[[nodiscard]]
constexpr auto mismatch(InputIt1 first1, InputIt1 last1, InputIt2 first2) ->
pair<InputIt1, InputIt2>
41 return etl::mismatch(first1, last1, first2, etl::equal_to());
44template <
typename InputIt1,
typename InputIt2,
typename Predicate>
45[[nodiscard]]
constexpr auto mismatch(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, Predicate pred)
46 ->
pair<InputIt1, InputIt2>
48 for (; first1 != last1
and first2 != last2; ++first1, (
void)++first2) {
49 if (
not pred(*first1, *first2)) {
54 return {first1, first2};
57template <
typename InputIt1,
typename InputIt2>
58[[nodiscard]]
constexpr auto mismatch(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2)
59 ->
pair<InputIt1, InputIt2>
61 return etl::mismatch(first1, last1, first2, last2, etl::equal_to());
constexpr auto mismatch(InputIt1 first1, InputIt1 last1, InputIt2 first2, Predicate pred) -> pair< InputIt1, InputIt2 >
Returns the first mismatching pair of elements from two ranges: one defined by [first1,...
Definition mismatch.hpp:26
Definition adjacent_find.hpp:9
constexpr auto mismatch(InputIt1 first1, InputIt1 last1, InputIt2 first2) -> pair< InputIt1, InputIt2 >
Definition mismatch.hpp:39
constexpr auto mismatch(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, Predicate pred) -> pair< InputIt1, InputIt2 >
Definition mismatch.hpp:45
constexpr auto mismatch(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2) -> pair< InputIt1, InputIt2 >
Definition mismatch.hpp:58
etl::pair is a class template that provides a way to store two heterogeneous objects as a single unit...
Definition pair.hpp:37