[llvm] [NFC][ADT] Add range wrapper for std::mismatch (PR #104838)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 19 13:33:25 PDT 2024
================
@@ -2002,6 +2002,13 @@ template <typename R, typename Compare> auto max_element(R &&Range, Compare C) {
return std::max_element(adl_begin(Range), adl_end(Range), C);
}
+/// Provide wrappers to std::mismatch which take ranges instead of having to
+/// pass begin/end explicitly.
+template <typename R1, typename R2> auto mismatch(R1 &&Range1, R2 &&Range2) {
----------------
jurahul wrote:
SG, then I'll just add what I intend to use. I added a comment with an example. PTAL.
https://github.com/llvm/llvm-project/pull/104838
More information about the llvm-commits
mailing list