[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 12:39:39 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:

I don't intend to use that overload. My understanding is that they are added on-demand. But I can add it.

https://github.com/llvm/llvm-project/pull/104838


More information about the llvm-commits mailing list