Further macro protection by replacing _[A-Z] with _[A-Z]p
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145410 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -772,8 +772,8 @@ forward_list<_Tp, _Alloc>::forward_list(size_type __n)
|
||||
if (__n > 0)
|
||||
{
|
||||
__node_allocator& __a = base::__alloc();
|
||||
typedef __allocator_destructor<__node_allocator> _D;
|
||||
unique_ptr<__node, _D> __h(nullptr, _D(__a, 1));
|
||||
typedef __allocator_destructor<__node_allocator> _Dp;
|
||||
unique_ptr<__node, _Dp> __h(nullptr, _Dp(__a, 1));
|
||||
for (__node_pointer __p = base::__before_begin(); __n > 0; --__n,
|
||||
__p = __p->__next_)
|
||||
{
|
||||
@@ -848,8 +848,8 @@ forward_list<_Tp, _Alloc>::forward_list(forward_list&& __x,
|
||||
{
|
||||
if (base::__alloc() != __x.__alloc())
|
||||
{
|
||||
typedef move_iterator<iterator> _I;
|
||||
insert_after(cbefore_begin(), _I(__x.begin()), _I(__x.end()));
|
||||
typedef move_iterator<iterator> _Ip;
|
||||
insert_after(cbefore_begin(), _Ip(__x.begin()), _Ip(__x.end()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -906,8 +906,8 @@ forward_list<_Tp, _Alloc>::__move_assign(forward_list& __x, false_type)
|
||||
__move_assign(__x, true_type());
|
||||
else
|
||||
{
|
||||
typedef move_iterator<iterator> _I;
|
||||
assign(_I(__x.begin()), _I(__x.end()));
|
||||
typedef move_iterator<iterator> _Ip;
|
||||
assign(_Ip(__x.begin()), _Ip(__x.end()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -995,8 +995,8 @@ void
|
||||
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));
|
||||
typedef __allocator_destructor<__node_allocator> _Dp;
|
||||
unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1));
|
||||
__node_traits::construct(__a, _VSTD::addressof(__h->__value_),
|
||||
_VSTD::forward<_Args>(__args)...);
|
||||
__h->__next_ = base::__before_begin()->__next_;
|
||||
@@ -1010,8 +1010,8 @@ void
|
||||
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));
|
||||
typedef __allocator_destructor<__node_allocator> _Dp;
|
||||
unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1));
|
||||
__node_traits::construct(__a, _VSTD::addressof(__h->__value_), _VSTD::move(__v));
|
||||
__h->__next_ = base::__before_begin()->__next_;
|
||||
base::__before_begin()->__next_ = __h.release();
|
||||
@@ -1024,8 +1024,8 @@ void
|
||||
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));
|
||||
typedef __allocator_destructor<__node_allocator> _Dp;
|
||||
unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1));
|
||||
__node_traits::construct(__a, _VSTD::addressof(__h->__value_), __v);
|
||||
__h->__next_ = base::__before_begin()->__next_;
|
||||
base::__before_begin()->__next_ = __h.release();
|
||||
@@ -1052,8 +1052,8 @@ forward_list<_Tp, _Alloc>::emplace_after(const_iterator __p, _Args&&... __args)
|
||||
{
|
||||
__node_pointer const __r = const_cast<__node_pointer>(__p.__ptr_);
|
||||
__node_allocator& __a = base::__alloc();
|
||||
typedef __allocator_destructor<__node_allocator> _D;
|
||||
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
|
||||
typedef __allocator_destructor<__node_allocator> _Dp;
|
||||
unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1));
|
||||
__node_traits::construct(__a, _VSTD::addressof(__h->__value_),
|
||||
_VSTD::forward<_Args>(__args)...);
|
||||
__h->__next_ = __r->__next_;
|
||||
@@ -1069,8 +1069,8 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, value_type&& __v)
|
||||
{
|
||||
__node_pointer const __r = const_cast<__node_pointer>(__p.__ptr_);
|
||||
__node_allocator& __a = base::__alloc();
|
||||
typedef __allocator_destructor<__node_allocator> _D;
|
||||
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
|
||||
typedef __allocator_destructor<__node_allocator> _Dp;
|
||||
unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1));
|
||||
__node_traits::construct(__a, _VSTD::addressof(__h->__value_), _VSTD::move(__v));
|
||||
__h->__next_ = __r->__next_;
|
||||
__r->__next_ = __h.release();
|
||||
@@ -1085,8 +1085,8 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, const value_type& __
|
||||
{
|
||||
__node_pointer const __r = const_cast<__node_pointer>(__p.__ptr_);
|
||||
__node_allocator& __a = base::__alloc();
|
||||
typedef __allocator_destructor<__node_allocator> _D;
|
||||
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
|
||||
typedef __allocator_destructor<__node_allocator> _Dp;
|
||||
unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1));
|
||||
__node_traits::construct(__a, _VSTD::addressof(__h->__value_), __v);
|
||||
__h->__next_ = __r->__next_;
|
||||
__r->__next_ = __h.release();
|
||||
@@ -1102,8 +1102,8 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, size_type __n,
|
||||
if (__n > 0)
|
||||
{
|
||||
__node_allocator& __a = base::__alloc();
|
||||
typedef __allocator_destructor<__node_allocator> _D;
|
||||
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
|
||||
typedef __allocator_destructor<__node_allocator> _Dp;
|
||||
unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1));
|
||||
__node_traits::construct(__a, _VSTD::addressof(__h->__value_), __v);
|
||||
__node_pointer __first = __h.release();
|
||||
__node_pointer __last = __first;
|
||||
@@ -1152,8 +1152,8 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p,
|
||||
if (__f != __l)
|
||||
{
|
||||
__node_allocator& __a = base::__alloc();
|
||||
typedef __allocator_destructor<__node_allocator> _D;
|
||||
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
|
||||
typedef __allocator_destructor<__node_allocator> _Dp;
|
||||
unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1));
|
||||
__node_traits::construct(__a, _VSTD::addressof(__h->__value_), *__f);
|
||||
__node_pointer __first = __h.release();
|
||||
__node_pointer __last = __first;
|
||||
@@ -1244,8 +1244,8 @@ forward_list<_Tp, _Alloc>::resize(size_type __n)
|
||||
if (__n > 0)
|
||||
{
|
||||
__node_allocator& __a = base::__alloc();
|
||||
typedef __allocator_destructor<__node_allocator> _D;
|
||||
unique_ptr<__node, _D> __h(nullptr, _D(__a, 1));
|
||||
typedef __allocator_destructor<__node_allocator> _Dp;
|
||||
unique_ptr<__node, _Dp> __h(nullptr, _Dp(__a, 1));
|
||||
for (__node_pointer __ptr = __p.__ptr_; __n > 0; --__n,
|
||||
__ptr = __ptr->__next_)
|
||||
{
|
||||
@@ -1276,8 +1276,8 @@ forward_list<_Tp, _Alloc>::resize(size_type __n, const value_type& __v)
|
||||
if (__n > 0)
|
||||
{
|
||||
__node_allocator& __a = base::__alloc();
|
||||
typedef __allocator_destructor<__node_allocator> _D;
|
||||
unique_ptr<__node, _D> __h(nullptr, _D(__a, 1));
|
||||
typedef __allocator_destructor<__node_allocator> _Dp;
|
||||
unique_ptr<__node, _Dp> __h(nullptr, _Dp(__a, 1));
|
||||
for (__node_pointer __ptr = __p.__ptr_; __n > 0; --__n,
|
||||
__ptr = __ptr->__next_)
|
||||
{
|
||||
@@ -1569,12 +1569,12 @@ template <class _Tp, class _Alloc>
|
||||
bool operator==(const forward_list<_Tp, _Alloc>& __x,
|
||||
const forward_list<_Tp, _Alloc>& __y)
|
||||
{
|
||||
typedef forward_list<_Tp, _Alloc> _C;
|
||||
typedef typename _C::const_iterator _I;
|
||||
_I __ix = __x.begin();
|
||||
_I __ex = __x.end();
|
||||
_I __iy = __y.begin();
|
||||
_I __ey = __y.end();
|
||||
typedef forward_list<_Tp, _Alloc> _Cp;
|
||||
typedef typename _Cp::const_iterator _Ip;
|
||||
_Ip __ix = __x.begin();
|
||||
_Ip __ex = __x.end();
|
||||
_Ip __iy = __y.begin();
|
||||
_Ip __ey = __y.end();
|
||||
for (; __ix != __ex && __iy != __ey; ++__ix, ++__iy)
|
||||
if (!(*__ix == *__iy))
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user