Make reverse() call iter_swap like the standard says, instead of calling swap directly. No real change.
llvm-svn: 251836
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: def501d1cade2b8cd1e1c26b4971abf93ffac9a3
diff --git a/include/algorithm b/include/algorithm
index 9088829..9c05119 100644
--- a/include/algorithm
+++ b/include/algorithm
@@ -2330,7 +2330,7 @@
{
if (__first == --__last)
break;
- swap(*__first, *__last);
+ _VSTD::iter_swap(__first, __last);
++__first;
}
}
@@ -2342,7 +2342,7 @@
{
if (__first != __last)
for (; __first < --__last; ++__first)
- swap(*__first, *__last);
+ _VSTD::iter_swap(__first, __last);
}
template <class _BidirectionalIterator>