aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/algorithm
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2014-09-16 20:40:05 +0000
committerMarshall Clow <mclow.lists@gmail.com>2014-09-16 20:40:05 +0000
commitbd7c7b55511a4b4b50b77559a44eff6d350224c4 (patch)
tree323a695547c181abd6e84f3787a60275399b7384 /libcxx/include/algorithm
parentf1e473bad91ade08503be6549c2cb4f229835327 (diff)
downloadllvm-bd7c7b55511a4b4b50b77559a44eff6d350224c4.zip
llvm-bd7c7b55511a4b4b50b77559a44eff6d350224c4.tar.gz
llvm-bd7c7b55511a4b4b50b77559a44eff6d350224c4.tar.bz2
Fix for mismatch to handle evil iterators which overload operator comma
llvm-svn: 217903
Diffstat (limited to 'libcxx/include/algorithm')
-rw-r--r--libcxx/include/algorithm4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm
index 3ba104b..dbe888f 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);