From bd7c7b55511a4b4b50b77559a44eff6d350224c4 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Tue, 16 Sep 2014 20:40:05 +0000 Subject: [PATCH] Fix for mismatch to handle evil iterators which overload operator comma llvm-svn: 217903 --- libcxx/include/algorithm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm index 3ba104bf4ea8..dbe888f78ddf 100644 --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -1140,7 +1140,7 @@ pair<_InputIterator1, _InputIterator2> mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __pred) { - for (; __first1 != __last1; ++__first1, ++__first2) + for (; __first1 != __last1; ++__first1, (void) ++__first2) if (!__pred(*__first1, *__first2)) break; return pair<_InputIterator1, _InputIterator2>(__first1, __first2); @@ -1164,7 +1164,7 @@ mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _BinaryPredicate __pred) { - for (; __first1 != __last1 && __first2 != __last2; ++__first1, ++__first2) + for (; __first1 != __last1 && __first2 != __last2; ++__first1, (void) ++__first2) if (!__pred(*__first1, *__first2)) break; return pair<_InputIterator1, _InputIterator2>(__first1, __first2);