aboutsummaryrefslogtreecommitdiffstats
path: root/include/algorithm
diff options
context:
space:
mode:
Diffstat (limited to 'include/algorithm')
-rw-r--r--include/algorithm32
1 files changed, 18 insertions, 14 deletions
diff --git a/include/algorithm b/include/algorithm
index 0d7862675588..55ea5eb2cc02 100644
--- a/include/algorithm
+++ b/include/algorithm
@@ -3117,10 +3117,10 @@ _SampleIterator __sample(_PopulationIterator __first,
input_iterator_tag) {
_Distance __k = 0;
- for (; __first != __last && __k < __n; ++__first, (void)++__k)
+ for (; __first != __last && __k < __n; ++__first, (void) ++__k)
__output_iter[__k] = *__first;
_Distance __sz = __k;
- for (; __first != __last; ++__first, (void)++__k) {
+ for (; __first != __last; ++__first, (void) ++__k) {
_Distance __r = _VSTD::uniform_int_distribution<_Distance>(0, __k)(__g);
if (__r < __sz)
__output_iter[__r] = *__first;
@@ -3190,7 +3190,7 @@ template<class _RandomAccessIterator, class _UniformRandomNumberGenerator>
if (__d > 1)
{
_Dp __uid;
- for (--__last, --__d; __first < __last; ++__first, --__d)
+ for (--__last, (void) --__d; __first < __last; ++__first, (void) --__d)
{
difference_type __i = __uid(__g, _Pp(0, __d));
if (__i != difference_type(0))
@@ -3373,7 +3373,7 @@ __stable_partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate
// All trues now at start of range, all falses in buffer
// Move falses back into range, but don't mess up __first which points to first false
__i = __first;
- for (value_type* __t2 = __p.first; __t2 < __t; ++__t2, ++__i)
+ for (value_type* __t2 = __p.first; __t2 < __t; ++__t2, (void) ++__i)
*__i = _VSTD::move(*__t2);
// __h destructs moved-from values out of the temp buffer, but doesn't deallocate buffer
return __first;
@@ -3505,7 +3505,7 @@ __stable_partition(_BidirectionalIterator __first, _BidirectionalIterator __last
__i = ++__first;
// All trues now at start of range, all falses in buffer
// Move falses back into range, but don't mess up __first which points to first false
- for (value_type* __t2 = __p.first; __t2 < __t; ++__t2, ++__i)
+ for (value_type* __t2 = __p.first; __t2 < __t; ++__t2, (void) ++__i)
*__i = _VSTD::move(*__t2);
// __h destructs moved-from values out of the temp buffer, but doesn't deallocate buffer
return __first;
@@ -4382,7 +4382,7 @@ merge(_InputIterator1 __first1, _InputIterator1 __last1,
{
typedef typename iterator_traits<_InputIterator1>::value_type __v1;
typedef typename iterator_traits<_InputIterator2>::value_type __v2;
- return merge(__first1, __last1, __first2, __last2, __result, __less<__v1, __v2>());
+ return _VSTD::merge(__first1, __last1, __first2, __last2, __result, __less<__v1, __v2>());
}
// inplace_merge
@@ -4428,14 +4428,14 @@ __buffered_inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator
if (__len1 <= __len2)
{
value_type* __p = __buff;
- for (_BidirectionalIterator __i = __first; __i != __middle; __d.__incr((value_type*)0), (void) ++__i, ++__p)
+ for (_BidirectionalIterator __i = __first; __i != __middle; __d.__incr((value_type*)0), (void) ++__i, (void) ++__p)
::new(__p) value_type(_VSTD::move(*__i));
__half_inplace_merge(__buff, __p, __middle, __last, __first, __comp);
}
else
{
value_type* __p = __buff;
- for (_BidirectionalIterator __i = __middle; __i != __last; __d.__incr((value_type*)0), (void) ++__i, ++__p)
+ for (_BidirectionalIterator __i = __middle; __i != __last; __d.__incr((value_type*)0), (void) ++__i, (void) ++__p)
::new(__p) value_type(_VSTD::move(*__i));
typedef reverse_iterator<_BidirectionalIterator> _RBi;
typedef reverse_iterator<value_type*> _Rv;
@@ -4575,14 +4575,14 @@ __merge_move_construct(_InputIterator1 __first1, _InputIterator1 __last1,
{
if (__first1 == __last1)
{
- for (; __first2 != __last2; ++__first2, ++__result, __d.__incr((value_type*)0))
+ for (; __first2 != __last2; ++__first2, ++__result, (void) __d.__incr((value_type*)0))
::new (__result) value_type(_VSTD::move(*__first2));
__h.release();
return;
}
if (__first2 == __last2)
{
- for (; __first1 != __last1; ++__first1, ++__result, __d.__incr((value_type*)0))
+ for (; __first1 != __last1; ++__first1, ++__result, (void) __d.__incr((value_type*)0))
::new (__result) value_type(_VSTD::move(*__first1));
__h.release();
return;
@@ -4612,7 +4612,7 @@ __merge_move_assign(_InputIterator1 __first1, _InputIterator1 __last1,
{
if (__first2 == __last2)
{
- for (; __first1 != __last1; ++__first1, ++__result)
+ for (; __first1 != __last1; ++__first1, (void) ++__result)
*__result = _VSTD::move(*__first1);
return;
}
@@ -4627,7 +4627,7 @@ __merge_move_assign(_InputIterator1 __first1, _InputIterator1 __last1,
++__first1;
}
}
- for (; __first2 != __last2; ++__first2, ++__result)
+ for (; __first2 != __last2; ++__first2, (void) ++__result)
*__result = _VSTD::move(*__first2);
}
@@ -4995,7 +4995,7 @@ void
__sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
{
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
- for (difference_type __n = __last - __first; __n > 1; --__last, --__n)
+ for (difference_type __n = __last - __first; __n > 1; --__last, (void) --__n)
__pop_heap<_Compare>(__first, __last, __comp, __n);
}
@@ -5065,7 +5065,7 @@ __partial_sort_copy(_InputIterator __first, _InputIterator __last,
_RandomAccessIterator __r = __result_first;
if (__r != __result_last)
{
- for (; __first != __last && __r != __result_last; (void) ++__first, ++__r)
+ for (; __first != __last && __r != __result_last; ++__first, (void) ++__r)
*__r = *__first;
__make_heap<_Compare>(__result_first, __r, __comp);
typename iterator_traits<_RandomAccessIterator>::difference_type __len = __r - __result_first;
@@ -5678,4 +5678,8 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
+#if defined(_LIBCPP_HAS_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17
+# include <__pstl_algorithm>
+#endif
+
#endif // _LIBCPP_ALGORITHM