Qualify calls to std::next(), to avoid conflicts with

libraries/applications that define their own 'next' template.

llvm-svn: 130511
This commit is contained in:
Douglas Gregor 2011-04-29 16:20:26 +00:00
parent 0e50682f26
commit 6c38001ec5
2 changed files with 5 additions and 5 deletions

View File

@ -1609,7 +1609,7 @@ __tree<_Tp, _Compare, _Allocator>::__find_equal(const_iterator __hint,
const_iterator __next = _STD::next(__hint);
if (__next == end() || value_comp()(__v, *__next))
{
// *__hint < __v < *next(__hint)
// *__hint < __v < *_STD::next(__hint)
if (__hint.__ptr_->__right_ == nullptr)
{
__parent = const_cast<__node_pointer&>(__hint.__ptr_);

View File

@ -1787,7 +1787,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, const value_type& __v)
--__base::__start_;
++__base::size();
if (__pos > 1)
__b = __move_and_check(next(__b), __b + __pos, __b, __vt);
__b = __move_and_check(_STD::next(__b), __b + __pos, __b, __vt);
*__b = *__vt;
}
}
@ -1847,7 +1847,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, value_type&& __v)
--__base::__start_;
++__base::size();
if (__pos > 1)
__b = _STD::move(next(__b), __b + __pos, __b);
__b = _STD::move(_STD::next(__b), __b + __pos, __b);
*__b = _STD::move(__v);
}
}
@ -1905,7 +1905,7 @@ deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args)
--__base::__start_;
++__base::size();
if (__pos > 1)
__b = _STD::move(next(__b), __b + __pos, __b);
__b = _STD::move(_STD::next(__b), __b + __pos, __b);
*__b = value_type(_STD::forward<_Args>(__args)...);
}
}
@ -2621,7 +2621,7 @@ deque<_Tp, _Allocator>::erase(const_iterator __f)
}
else
{ // erase from back
iterator __i = _STD::move(next(__p), __base::end(), __p);
iterator __i = _STD::move(_STD::next(__p), __base::end(), __p);
__alloc_traits::destroy(__a, _STD::addressof(*__i));
--__base::size();
if (__back_spare() >= 2 * __base::__block_size)