diff options
Diffstat (limited to 'contrib/libc++/include/algorithm')
-rw-r--r-- | contrib/libc++/include/algorithm | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/contrib/libc++/include/algorithm b/contrib/libc++/include/algorithm index 7b0c53e..71e5df3 100644 --- a/contrib/libc++/include/algorithm +++ b/contrib/libc++/include/algorithm @@ -851,7 +851,7 @@ for_each(_InputIterator __first, _InputIterator __last, _Function __f) { for (; __first != __last; ++__first) __f(*__first); - return _VSTD::move(__f); // explicitly moved for (emulated) C++03 + return _LIBCPP_EXPLICIT_MOVE(__f); // explicitly moved for (emulated) C++03 } // find @@ -1687,25 +1687,6 @@ search_n(_ForwardIterator __first, _ForwardIterator __last, _Size __count, const } // copy - -template <class _Iter> -struct __libcpp_is_trivial_iterator -{ - static const bool value = is_pointer<_Iter>::value; -}; - -template <class _Iter> -struct __libcpp_is_trivial_iterator<move_iterator<_Iter> > -{ - static const bool value = is_pointer<_Iter>::value; -}; - -template <class _Iter> -struct __libcpp_is_trivial_iterator<__wrap_iter<_Iter> > -{ - static const bool value = is_pointer<_Iter>::value; -}; - template <class _Iter> inline _LIBCPP_INLINE_VISIBILITY _Iter @@ -2330,7 +2311,7 @@ __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last, bidirec { if (__first == --__last) break; - swap(*__first, *__last); + _VSTD::iter_swap(__first, __last); ++__first; } } @@ -2342,7 +2323,7 @@ __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last, random_ac { if (__first != __last) for (; __first < --__last; ++__first) - swap(*__first, *__last); + _VSTD::iter_swap(__first, __last); } template <class _BidirectionalIterator> @@ -3037,7 +3018,7 @@ uniform_int_distribution<_IntType>::operator()(_URNG& __g, const param_type& __p if (_Rp == 0) return static_cast<result_type>(_Eng(__g, _Dt)()); size_t __w = _Dt - __clz(_Rp) - 1; - if ((_Rp & (_UIntType(~0) >> (_Dt - __w))) != 0) + if ((_Rp & (std::numeric_limits<_UIntType>::max() >> (_Dt - __w))) != 0) ++__w; _Eng __e(__g, __w); _UIntType __u; |