13#ifndef RANGES_V3_ALGORITHM_MISMATCH_HPP
14#define RANGES_V3_ALGORITHM_MISMATCH_HPP
22#include <range/v3/algorithm/result_types.hpp>
32#include <range/v3/utility/static_const.hpp>
34#include <range/v3/detail/prologue.hpp>
40 template<
typename I1,
typename I2>
41 using mismatch_result = detail::in1_in2_result<I1, I2>;
43 RANGES_FUNC_BEGIN(mismatch)
56 "Use the
variant of ranges::mismatch that takes an upper bound for "
58 mismatch_result<I1, I2> RANGES_FUNC(mismatch)(I1 begin1,
65 for(; begin1 != end1; ++begin1, ++begin2)
68 return {begin1, begin2};
82 constexpr mismatch_result<I1, I2> RANGES_FUNC(mismatch)(I1 begin1,
90 for(; begin1 != end1 && begin2 != end2; ++begin1, ++begin2)
93 return {begin1, begin2};
97 template(
typename Rng1,
105 projected<uncvref_t<I2Ref>, P2>>)
107 "Use the variant of ranges::mismatch that takes an upper bound for "
109 mismatch_result<borrowed_iterator_t<Rng1>, uncvref_t<I2Ref>>
110 RANGES_FUNC(mismatch)(Rng1 && rng1,
116 RANGES_DIAGNOSTIC_PUSH
117 RANGES_DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS
118 return (*
this)(begin(rng1),
120 static_cast<uncvref_t<I2Ref> &&
>(begin2),
124 RANGES_DIAGNOSTIC_POP
128 template(
typename Rng1,
137 constexpr mismatch_result<borrowed_iterator_t<Rng1>, borrowed_iterator_t<Rng2>>
138 RANGES_FUNC(mismatch)(Rng1 && rng1,
144 return (*
this)(begin(rng1),
153 RANGES_FUNC_END(mismatch)
157 using ranges::mismatch;
158 using ranges::mismatch_result;
173#include <range/v3/detail/epilogue.hpp>
The indirect_relation concept.
The sentinel_for concept.
decltype(begin(declval(Rng &))) iterator_t
Definition access.hpp:698
typename Fn::template invoke< Args... > invoke
Evaluate the invocable Fn with the arguments Args.
Definition meta.hpp:541
Definition comparisons.hpp:28
Definition identity.hpp:25
Definition variant.hpp:621