_STD -> _VSTD to avoid macro clash on windows

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134190 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant
2011-06-30 21:18:19 +00:00
parent d318d49e5c
commit 0949eedbd6
58 changed files with 1567 additions and 1567 deletions

View File

@@ -446,7 +446,7 @@ private:
_LIBCPP_INLINE_VISIBILITY
void __move_assign_alloc(__forward_list_base& __x, true_type)
_NOEXCEPT_(is_nothrow_move_assignable<__node_allocator>::value)
{__alloc() = _STD::move(__x.__alloc());}
{__alloc() = _VSTD::move(__x.__alloc());}
_LIBCPP_INLINE_VISIBILITY
static void __swap_alloc(__node_allocator& __x, __node_allocator& __y)
@@ -464,7 +464,7 @@ private:
true_type)
_NOEXCEPT_(__is_nothrow_swappable<__node_allocator>::value)
{
using _STD::swap;
using _VSTD::swap;
swap(__x, __y);
}
};
@@ -475,7 +475,7 @@ template <class _Tp, class _Alloc>
inline _LIBCPP_INLINE_VISIBILITY
__forward_list_base<_Tp, _Alloc>::__forward_list_base(__forward_list_base&& __x)
_NOEXCEPT_(is_nothrow_move_constructible<__node_allocator>::value)
: __before_begin_(_STD::move(__x.__before_begin_))
: __before_begin_(_VSTD::move(__x.__before_begin_))
{
__x.__before_begin()->__next_ = nullptr;
}
@@ -509,7 +509,7 @@ __forward_list_base<_Tp, _Alloc>::swap(__forward_list_base& __x)
__is_nothrow_swappable<__node_allocator>::value)
{
__swap_alloc(__alloc(), __x.__alloc());
using _STD::swap;
using _VSTD::swap;
swap(__before_begin()->__next_, __x.__before_begin()->__next_);
}
@@ -521,7 +521,7 @@ __forward_list_base<_Tp, _Alloc>::clear() _NOEXCEPT
for (__node_pointer __p = __before_begin()->__next_; __p != nullptr;)
{
__node_pointer __next = __p->__next_;
__node_traits::destroy(__a, _STD::addressof(__p->__value_));
__node_traits::destroy(__a, _VSTD::addressof(__p->__value_));
__node_traits::deallocate(__a, __p, 1);
__p = __next;
}
@@ -577,7 +577,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
forward_list(forward_list&& __x)
_NOEXCEPT_(is_nothrow_move_constructible<base>::value)
: base(_STD::move(__x)) {}
: base(_VSTD::move(__x)) {}
forward_list(forward_list&& __x, const allocator_type& __a);
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
forward_list(initializer_list<value_type> __il);
@@ -718,7 +718,7 @@ public:
template <class _Compare>
_LIBCPP_INLINE_VISIBILITY
void merge(forward_list&& __x, _Compare __comp)
{merge(__x, _STD::move(__comp));}
{merge(__x, _VSTD::move(__comp));}
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
void merge(forward_list& __x) {merge(__x, __less<value_type>());}
@@ -766,7 +766,7 @@ forward_list<_Tp, _Alloc>::forward_list(size_type __n)
__p = __p->__next_)
{
__h.reset(__node_traits::allocate(__a, 1));
__node_traits::construct(__a, _STD::addressof(__h->__value_));
__node_traits::construct(__a, _VSTD::addressof(__h->__value_));
__h->__next_ = nullptr;
__p->__next_ = __h.release();
}
@@ -832,7 +832,7 @@ forward_list<_Tp, _Alloc>::forward_list(const forward_list& __x,
template <class _Tp, class _Alloc>
forward_list<_Tp, _Alloc>::forward_list(forward_list&& __x,
const allocator_type& __a)
: base(_STD::move(__x), __a)
: base(_VSTD::move(__x), __a)
{
if (base::__alloc() != __x.__alloc())
{
@@ -929,7 +929,7 @@ typename enable_if
forward_list<_Tp, _Alloc>::assign(_InputIterator __f, _InputIterator __l)
{
iterator __i = before_begin();
iterator __j = _STD::next(__i);
iterator __j = _VSTD::next(__i);
iterator __e = end();
for (; __j != __e && __f != __l; ++__i, ++__j, ++__f)
*__j = *__f;
@@ -944,7 +944,7 @@ void
forward_list<_Tp, _Alloc>::assign(size_type __n, const value_type& __v)
{
iterator __i = before_begin();
iterator __j = _STD::next(__i);
iterator __j = _VSTD::next(__i);
iterator __e = end();
for (; __j != __e && __n > 0; --__n, ++__i, ++__j)
*__j = __v;
@@ -973,8 +973,8 @@ forward_list<_Tp, _Alloc>::emplace_front(_Args&&... __args)
__node_allocator& __a = base::__alloc();
typedef __allocator_destructor<__node_allocator> _D;
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
__node_traits::construct(__a, _STD::addressof(__h->__value_),
_STD::forward<_Args>(__args)...);
__node_traits::construct(__a, _VSTD::addressof(__h->__value_),
_VSTD::forward<_Args>(__args)...);
__h->__next_ = base::__before_begin()->__next_;
base::__before_begin()->__next_ = __h.release();
}
@@ -988,7 +988,7 @@ forward_list<_Tp, _Alloc>::push_front(value_type&& __v)
__node_allocator& __a = base::__alloc();
typedef __allocator_destructor<__node_allocator> _D;
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
__node_traits::construct(__a, _STD::addressof(__h->__value_), _STD::move(__v));
__node_traits::construct(__a, _VSTD::addressof(__h->__value_), _VSTD::move(__v));
__h->__next_ = base::__before_begin()->__next_;
base::__before_begin()->__next_ = __h.release();
}
@@ -1002,7 +1002,7 @@ forward_list<_Tp, _Alloc>::push_front(const value_type& __v)
__node_allocator& __a = base::__alloc();
typedef __allocator_destructor<__node_allocator> _D;
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
__node_traits::construct(__a, _STD::addressof(__h->__value_), __v);
__node_traits::construct(__a, _VSTD::addressof(__h->__value_), __v);
__h->__next_ = base::__before_begin()->__next_;
base::__before_begin()->__next_ = __h.release();
}
@@ -1014,7 +1014,7 @@ forward_list<_Tp, _Alloc>::pop_front()
__node_allocator& __a = base::__alloc();
__node_pointer __p = base::__before_begin()->__next_;
base::__before_begin()->__next_ = __p->__next_;
__node_traits::destroy(__a, _STD::addressof(__p->__value_));
__node_traits::destroy(__a, _VSTD::addressof(__p->__value_));
__node_traits::deallocate(__a, __p, 1);
}
@@ -1030,8 +1030,8 @@ forward_list<_Tp, _Alloc>::emplace_after(const_iterator __p, _Args&&... __args)
__node_allocator& __a = base::__alloc();
typedef __allocator_destructor<__node_allocator> _D;
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
__node_traits::construct(__a, _STD::addressof(__h->__value_),
_STD::forward<_Args>(__args)...);
__node_traits::construct(__a, _VSTD::addressof(__h->__value_),
_VSTD::forward<_Args>(__args)...);
__h->__next_ = __r->__next_;
__r->__next_ = __h.release();
return iterator(__r->__next_);
@@ -1047,7 +1047,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, value_type&& __v)
__node_allocator& __a = base::__alloc();
typedef __allocator_destructor<__node_allocator> _D;
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
__node_traits::construct(__a, _STD::addressof(__h->__value_), _STD::move(__v));
__node_traits::construct(__a, _VSTD::addressof(__h->__value_), _VSTD::move(__v));
__h->__next_ = __r->__next_;
__r->__next_ = __h.release();
return iterator(__r->__next_);
@@ -1063,7 +1063,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, const value_type& __
__node_allocator& __a = base::__alloc();
typedef __allocator_destructor<__node_allocator> _D;
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
__node_traits::construct(__a, _STD::addressof(__h->__value_), __v);
__node_traits::construct(__a, _VSTD::addressof(__h->__value_), __v);
__h->__next_ = __r->__next_;
__r->__next_ = __h.release();
return iterator(__r->__next_);
@@ -1080,7 +1080,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, size_type __n,
__node_allocator& __a = base::__alloc();
typedef __allocator_destructor<__node_allocator> _D;
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
__node_traits::construct(__a, _STD::addressof(__h->__value_), __v);
__node_traits::construct(__a, _VSTD::addressof(__h->__value_), __v);
__node_pointer __first = __h.release();
__node_pointer __last = __first;
#ifndef _LIBCPP_NO_EXCEPTIONS
@@ -1090,7 +1090,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, size_type __n,
for (--__n; __n != 0; --__n, __last = __last->__next_)
{
__h.reset(__node_traits::allocate(__a, 1));
__node_traits::construct(__a, _STD::addressof(__h->__value_), __v);
__node_traits::construct(__a, _VSTD::addressof(__h->__value_), __v);
__last->__next_ = __h.release();
}
#ifndef _LIBCPP_NO_EXCEPTIONS
@@ -1100,7 +1100,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, size_type __n,
while (__first != nullptr)
{
__node_pointer __next = __first->__next_;
__node_traits::destroy(__a, _STD::addressof(__first->__value_));
__node_traits::destroy(__a, _VSTD::addressof(__first->__value_));
__node_traits::deallocate(__a, __first, 1);
__first = __next;
}
@@ -1130,7 +1130,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p,
__node_allocator& __a = base::__alloc();
typedef __allocator_destructor<__node_allocator> _D;
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
__node_traits::construct(__a, _STD::addressof(__h->__value_), *__f);
__node_traits::construct(__a, _VSTD::addressof(__h->__value_), *__f);
__node_pointer __first = __h.release();
__node_pointer __last = __first;
#ifndef _LIBCPP_NO_EXCEPTIONS
@@ -1140,7 +1140,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p,
for (++__f; __f != __l; ++__f, __last = __last->__next_)
{
__h.reset(__node_traits::allocate(__a, 1));
__node_traits::construct(__a, _STD::addressof(__h->__value_), *__f);
__node_traits::construct(__a, _VSTD::addressof(__h->__value_), *__f);
__last->__next_ = __h.release();
}
#ifndef _LIBCPP_NO_EXCEPTIONS
@@ -1150,7 +1150,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p,
while (__first != nullptr)
{
__node_pointer __next = __first->__next_;
__node_traits::destroy(__a, _STD::addressof(__first->__value_));
__node_traits::destroy(__a, _VSTD::addressof(__first->__value_));
__node_traits::deallocate(__a, __first, 1);
__first = __next;
}
@@ -1172,7 +1172,7 @@ forward_list<_Tp, _Alloc>::erase_after(const_iterator __f)
__node_pointer __n = __p->__next_;
__p->__next_ = __n->__next_;
__node_allocator& __a = base::__alloc();
__node_traits::destroy(__a, _STD::addressof(__n->__value_));
__node_traits::destroy(__a, _VSTD::addressof(__n->__value_));
__node_traits::deallocate(__a, __n, 1);
return iterator(__p->__next_);
}
@@ -1193,7 +1193,7 @@ forward_list<_Tp, _Alloc>::erase_after(const_iterator __f, const_iterator __l)
do
{
__p = __n->__next_;
__node_traits::destroy(__a, _STD::addressof(__n->__value_));
__node_traits::destroy(__a, _VSTD::addressof(__n->__value_));
__node_traits::deallocate(__a, __n, 1);
__n = __p;
} while (__n != __e);
@@ -1226,7 +1226,7 @@ forward_list<_Tp, _Alloc>::resize(size_type __n)
__ptr = __ptr->__next_)
{
__h.reset(__node_traits::allocate(__a, 1));
__node_traits::construct(__a, _STD::addressof(__h->__value_));
__node_traits::construct(__a, _VSTD::addressof(__h->__value_));
__h->__next_ = nullptr;
__ptr->__next_ = __h.release();
}
@@ -1258,7 +1258,7 @@ forward_list<_Tp, _Alloc>::resize(size_type __n, const value_type& __v)
__ptr = __ptr->__next_)
{
__h.reset(__node_traits::allocate(__a, 1));
__node_traits::construct(__a, _STD::addressof(__h->__value_), __v);
__node_traits::construct(__a, _VSTD::addressof(__h->__value_), __v);
__h->__next_ = nullptr;
__ptr->__next_ = __h.release();
}
@@ -1293,7 +1293,7 @@ forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
forward_list& __x,
const_iterator __i)
{
const_iterator __lm1 = _STD::next(__i);
const_iterator __lm1 = _VSTD::next(__i);
if (__p != __i && __p != __lm1)
{
const_cast<__node_pointer>(__i.__ptr_)->__next_ =
@@ -1370,7 +1370,7 @@ forward_list<_Tp, _Alloc>::remove(const value_type& __v)
{
if (__i.__ptr_->__next_->__value_ == __v)
{
iterator __j = _STD::next(__i, 2);
iterator __j = _VSTD::next(__i, 2);
for (; __j != __e && *__j == __v; ++__j)
;
erase_after(__i, __j);
@@ -1393,7 +1393,7 @@ forward_list<_Tp, _Alloc>::remove_if(_Predicate __pred)
{
if (__pred(__i.__ptr_->__next_->__value_))
{
iterator __j = _STD::next(__i, 2);
iterator __j = _VSTD::next(__i, 2);
for (; __j != __e && __pred(*__j); ++__j)
;
erase_after(__i, __j);
@@ -1413,7 +1413,7 @@ forward_list<_Tp, _Alloc>::unique(_BinaryPredicate __binary_pred)
{
for (iterator __i = begin(), __e = end(); __i != __e;)
{
iterator __j = _STD::next(__i);
iterator __j = _VSTD::next(__i);
for (; __j != __e && __binary_pred(*__i, *__j); ++__j)
;
if (__i.__ptr_->__next_ != __j.__ptr_)
@@ -1488,7 +1488,7 @@ void
forward_list<_Tp, _Alloc>::sort(_Compare __comp)
{
base::__before_begin()->__next_ = __sort(base::__before_begin()->__next_,
_STD::distance(begin(), end()), __comp);
_VSTD::distance(begin(), end()), __comp);
}
template <class _Tp, class _Alloc>
@@ -1514,7 +1514,7 @@ forward_list<_Tp, _Alloc>::__sort(__node_pointer __f1, difference_type __sz,
}
difference_type __sz1 = __sz / 2;
difference_type __sz2 = __sz - __sz1;
__node_pointer __t = _STD::next(iterator(__f1), __sz1 - 1).__ptr_;
__node_pointer __t = _VSTD::next(iterator(__f1), __sz1 - 1).__ptr_;
__node_pointer __f2 = __t->__next_;
__t->__next_ = nullptr;
return __merge(__sort(__f1, __sz1, __comp),
@@ -1570,7 +1570,7 @@ inline _LIBCPP_INLINE_VISIBILITY
bool operator< (const forward_list<_Tp, _Alloc>& __x,
const forward_list<_Tp, _Alloc>& __y)
{
return _STD::lexicographical_compare(__x.begin(), __x.end(),
return _VSTD::lexicographical_compare(__x.begin(), __x.end(),
__y.begin(), __y.end());
}