diff options
| author | Marshall Clow <mclow.lists@gmail.com> | 2014-09-16 20:40:05 +0000 |
|---|---|---|
| committer | Marshall Clow <mclow.lists@gmail.com> | 2014-09-16 20:40:05 +0000 |
| commit | bd7c7b55511a4b4b50b77559a44eff6d350224c4 (patch) | |
| tree | 323a695547c181abd6e84f3787a60275399b7384 | |
| parent | f1e473bad91ade08503be6549c2cb4f229835327 (diff) | |
| download | bcm5719-llvm-bd7c7b55511a4b4b50b77559a44eff6d350224c4.tar.gz bcm5719-llvm-bd7c7b55511a4b4b50b77559a44eff6d350224c4.zip | |
Fix for mismatch to handle evil iterators which overload operator comma
llvm-svn: 217903
| -rw-r--r-- | libcxx/include/algorithm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm index 3ba104bf4ea..dbe888f78dd 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); |

