Zhihao Yuan noted that a move assignment operation was missing from std::adjacent_difference. Fixed.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189036 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant
2013-08-22 18:02:34 +00:00
parent 8a1df3ca0c
commit 1c44f51de7
3 changed files with 89 additions and 2 deletions

View File

@@ -157,7 +157,7 @@ adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterat
{
typename iterator_traits<_InputIterator>::value_type __t2(*__first);
*__result = __t2 - __t1;
__t1 = __t2;
__t1 = _VSTD::move(__t2);
}
}
return __result;
@@ -177,7 +177,7 @@ adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterat
{
typename iterator_traits<_InputIterator>::value_type __t2(*__first);
*__result = __binary_op(__t2, __t1);
__t1 = __t2;
__t1 = _VSTD::move(__t2);
}
}
return __result;