This commit is contained in:
jeanlemotan
2024-07-02 18:06:33 +02:00
commit 8297b0b45f
157 changed files with 24865 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
#pragma once
#include "tl/detail/prologue.h"
#include "tl/iterator.h"
#include <algorithm>
namespace tl
{
//////////////////////////////////////////////////////////////////////////
// mismatch()
//
// Container-based version of the <algorithm> `std::mismatch()` function to
// return the first element where two ordered containers differ
template <typename C1, typename C2>
auto mismatch(C1& c1, C2& c2) noexcept -> std::pair<decltype(tl::begin(c1)), decltype(tl::begin(c2))>;
// Overload of mismatch() for using a predicate evaluation other than `==` as
// the function's test condition.
template <typename C1, typename C2, typename BinaryPredicate>
auto mismatch(C1& c1, C2& c2, BinaryPredicate&& p) noexcept -> std::pair<decltype(tl::begin(c1)), decltype(tl::begin(c2))>;
//////////////////////////////////////////////////////////////////////////
} // end namespace tl