Qualify calls to addressof with std::. Bug 9106
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@124726 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
211f0ee1be
commit
2529d02b5d
@ -85,7 +85,7 @@ public:
|
|||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
reference operator*() const {return __node_->__value_;}
|
reference operator*() const {return __node_->__value_;}
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
pointer operator->() const {return addressof(__node_->__value_);}
|
pointer operator->() const {return _STD::addressof(__node_->__value_);}
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
__hash_iterator& operator++()
|
__hash_iterator& operator++()
|
||||||
@ -163,7 +163,7 @@ public:
|
|||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
reference operator*() const {return __node_->__value_;}
|
reference operator*() const {return __node_->__value_;}
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
pointer operator->() const {return addressof(__node_->__value_);}
|
pointer operator->() const {return _STD::addressof(__node_->__value_);}
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
__hash_const_iterator& operator++()
|
__hash_const_iterator& operator++()
|
||||||
@ -433,7 +433,7 @@ public:
|
|||||||
void operator()(pointer __p)
|
void operator()(pointer __p)
|
||||||
{
|
{
|
||||||
if (__value_constructed)
|
if (__value_constructed)
|
||||||
__alloc_traits::destroy(__na_, addressof(__p->__value_));
|
__alloc_traits::destroy(__na_, _STD::addressof(__p->__value_));
|
||||||
if (__p)
|
if (__p)
|
||||||
__alloc_traits::deallocate(__na_, __p, 1);
|
__alloc_traits::deallocate(__na_, __p, 1);
|
||||||
}
|
}
|
||||||
@ -798,7 +798,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u)
|
|||||||
if (size() > 0)
|
if (size() > 0)
|
||||||
{
|
{
|
||||||
__bucket_list_[__p1_.first().__next_->__hash_ % bucket_count()] =
|
__bucket_list_[__p1_.first().__next_->__hash_ % bucket_count()] =
|
||||||
static_cast<__node_pointer>(addressof(__p1_.first()));
|
static_cast<__node_pointer>(_STD::addressof(__p1_.first()));
|
||||||
__u.__p1_.first().__next_ = nullptr;
|
__u.__p1_.first().__next_ = nullptr;
|
||||||
__u.size() = 0;
|
__u.size() = 0;
|
||||||
}
|
}
|
||||||
@ -822,7 +822,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u,
|
|||||||
__p1_.first().__next_ = __u.__p1_.first().__next_;
|
__p1_.first().__next_ = __u.__p1_.first().__next_;
|
||||||
__u.__p1_.first().__next_ = nullptr;
|
__u.__p1_.first().__next_ = nullptr;
|
||||||
__bucket_list_[__p1_.first().__next_->__hash_ % bucket_count()] =
|
__bucket_list_[__p1_.first().__next_->__hash_ % bucket_count()] =
|
||||||
static_cast<__node_pointer>(addressof(__p1_.first()));
|
static_cast<__node_pointer>(_STD::addressof(__p1_.first()));
|
||||||
size() = __u.size();
|
size() = __u.size();
|
||||||
__u.size() = 0;
|
__u.size() = 0;
|
||||||
}
|
}
|
||||||
@ -875,7 +875,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__deallocate(__node_pointer __np)
|
|||||||
while (__np != nullptr)
|
while (__np != nullptr)
|
||||||
{
|
{
|
||||||
__node_pointer __next = __np->__next_;
|
__node_pointer __next = __np->__next_;
|
||||||
__node_traits::destroy(__na, addressof(__np->__value_));
|
__node_traits::destroy(__na, _STD::addressof(__np->__value_));
|
||||||
__node_traits::deallocate(__na, __np, 1);
|
__node_traits::deallocate(__na, __np, 1);
|
||||||
__np = __next;
|
__np = __next;
|
||||||
}
|
}
|
||||||
@ -914,7 +914,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__move_assign(
|
|||||||
if (size() > 0)
|
if (size() > 0)
|
||||||
{
|
{
|
||||||
__bucket_list_[__p1_.first().__next_->__hash_ % bucket_count()] =
|
__bucket_list_[__p1_.first().__next_->__hash_ % bucket_count()] =
|
||||||
static_cast<__node_pointer>(addressof(__p1_.first()));
|
static_cast<__node_pointer>(_STD::addressof(__p1_.first()));
|
||||||
__u.__p1_.first().__next_ = nullptr;
|
__u.__p1_.first().__next_ = nullptr;
|
||||||
__u.size() = 0;
|
__u.size() = 0;
|
||||||
}
|
}
|
||||||
@ -1131,7 +1131,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_unique(__node_pointer __
|
|||||||
__node_pointer __pn = __bucket_list_[__chash];
|
__node_pointer __pn = __bucket_list_[__chash];
|
||||||
if (__pn == nullptr)
|
if (__pn == nullptr)
|
||||||
{
|
{
|
||||||
__pn = static_cast<__node_pointer>(addressof(__p1_.first()));
|
__pn = static_cast<__node_pointer>(_STD::addressof(__p1_.first()));
|
||||||
__nd->__next_ = __pn->__next_;
|
__nd->__next_ = __pn->__next_;
|
||||||
__pn->__next_ = __nd;
|
__pn->__next_ = __nd;
|
||||||
// fix up __bucket_list_
|
// fix up __bucket_list_
|
||||||
@ -1169,7 +1169,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi(__node_pointer __c
|
|||||||
__node_pointer __pn = __bucket_list_[__chash];
|
__node_pointer __pn = __bucket_list_[__chash];
|
||||||
if (__pn == nullptr)
|
if (__pn == nullptr)
|
||||||
{
|
{
|
||||||
__pn = static_cast<__node_pointer>(addressof(__p1_.first()));
|
__pn = static_cast<__node_pointer>(_STD::addressof(__p1_.first()));
|
||||||
__cp->__next_ = __pn->__next_;
|
__cp->__next_ = __pn->__next_;
|
||||||
__pn->__next_ = __cp;
|
__pn->__next_ = __cp;
|
||||||
// fix up __bucket_list_
|
// fix up __bucket_list_
|
||||||
@ -1275,7 +1275,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__insert_unique(const value_type& __x)
|
|||||||
__node_pointer __pn = __bucket_list_[__chash];
|
__node_pointer __pn = __bucket_list_[__chash];
|
||||||
if (__pn == nullptr)
|
if (__pn == nullptr)
|
||||||
{
|
{
|
||||||
__pn = static_cast<__node_pointer>(addressof(__p1_.first()));
|
__pn = static_cast<__node_pointer>(_STD::addressof(__p1_.first()));
|
||||||
__h->__next_ = __pn->__next_;
|
__h->__next_ = __pn->__next_;
|
||||||
__pn->__next_ = __h.get();
|
__pn->__next_ = __h.get();
|
||||||
// fix up __bucket_list_
|
// fix up __bucket_list_
|
||||||
@ -1433,7 +1433,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__rehash(size_type __nbc)
|
|||||||
{
|
{
|
||||||
for (size_type __i = 0; __i < __nbc; ++__i)
|
for (size_type __i = 0; __i < __nbc; ++__i)
|
||||||
__bucket_list_[__i] = nullptr;
|
__bucket_list_[__i] = nullptr;
|
||||||
__node_pointer __pp(static_cast<__node_pointer>(addressof(__p1_.first())));
|
__node_pointer __pp(static_cast<__node_pointer>(_STD::addressof(__p1_.first())));
|
||||||
__node_pointer __cp = __pp->__next_;
|
__node_pointer __cp = __pp->__next_;
|
||||||
if (__cp != nullptr)
|
if (__cp != nullptr)
|
||||||
{
|
{
|
||||||
@ -1533,7 +1533,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(_Args&& ...__args)
|
|||||||
{
|
{
|
||||||
__node_allocator& __na = __node_alloc();
|
__node_allocator& __na = __node_alloc();
|
||||||
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
||||||
__node_traits::construct(__na, addressof(__h->__value_), _STD::forward<_Args>(__args)...);
|
__node_traits::construct(__na, _STD::addressof(__h->__value_), _STD::forward<_Args>(__args)...);
|
||||||
__h.get_deleter().__value_constructed = true;
|
__h.get_deleter().__value_constructed = true;
|
||||||
__h->__hash_ = hash_function()(__h->__value_);
|
__h->__hash_ = hash_function()(__h->__value_);
|
||||||
__h->__next_ = nullptr;
|
__h->__next_ = nullptr;
|
||||||
@ -1549,7 +1549,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(value_type&& __v,
|
|||||||
{
|
{
|
||||||
__node_allocator& __na = __node_alloc();
|
__node_allocator& __na = __node_alloc();
|
||||||
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
||||||
__node_traits::construct(__na, addressof(__h->__value_), _STD::move(__v));
|
__node_traits::construct(__na, _STD::addressof(__h->__value_), _STD::move(__v));
|
||||||
__h.get_deleter().__value_constructed = true;
|
__h.get_deleter().__value_constructed = true;
|
||||||
__h->__hash_ = __hash;
|
__h->__hash_ = __hash;
|
||||||
__h->__next_ = nullptr;
|
__h->__next_ = nullptr;
|
||||||
@ -1564,7 +1564,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(const value_type& __v
|
|||||||
{
|
{
|
||||||
__node_allocator& __na = __node_alloc();
|
__node_allocator& __na = __node_alloc();
|
||||||
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
||||||
__node_traits::construct(__na, addressof(__h->__value_), __v);
|
__node_traits::construct(__na, _STD::addressof(__h->__value_), __v);
|
||||||
__h.get_deleter().__value_constructed = true;
|
__h.get_deleter().__value_constructed = true;
|
||||||
__h->__hash_ = hash_function()(__h->__value_);
|
__h->__hash_ = hash_function()(__h->__value_);
|
||||||
__h->__next_ = nullptr;
|
__h->__next_ = nullptr;
|
||||||
@ -1580,7 +1580,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(const value_type& __v
|
|||||||
{
|
{
|
||||||
__node_allocator& __na = __node_alloc();
|
__node_allocator& __na = __node_alloc();
|
||||||
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
||||||
__node_traits::construct(__na, addressof(__h->__value_), __v);
|
__node_traits::construct(__na, _STD::addressof(__h->__value_), __v);
|
||||||
__h.get_deleter().__value_constructed = true;
|
__h.get_deleter().__value_constructed = true;
|
||||||
__h->__hash_ = __hash;
|
__h->__hash_ = __hash;
|
||||||
__h->__next_ = nullptr;
|
__h->__next_ = nullptr;
|
||||||
@ -1658,7 +1658,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::remove(const_iterator __p)
|
|||||||
// Fix up __bucket_list_
|
// Fix up __bucket_list_
|
||||||
// if __pn is not in same bucket (before begin is not in same bucket) &&
|
// if __pn is not in same bucket (before begin is not in same bucket) &&
|
||||||
// if __cn->__next_ is not in same bucket (nullptr is not in same bucket)
|
// if __cn->__next_ is not in same bucket (nullptr is not in same bucket)
|
||||||
if (__pn == addressof(__p1_.first()) || __pn->__hash_ % __bc != __chash)
|
if (__pn == _STD::addressof(__p1_.first()) || __pn->__hash_ % __bc != __chash)
|
||||||
{
|
{
|
||||||
if (__cn->__next_ == nullptr || __cn->__next_->__hash_ % __bc != __chash)
|
if (__cn->__next_ == nullptr || __cn->__next_->__hash_ % __bc != __chash)
|
||||||
__bucket_list_[__chash] = nullptr;
|
__bucket_list_[__chash] = nullptr;
|
||||||
@ -1791,10 +1791,10 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::swap(__hash_table& __u)
|
|||||||
__p3_.swap(__u.__p3_);
|
__p3_.swap(__u.__p3_);
|
||||||
if (size() > 0)
|
if (size() > 0)
|
||||||
__bucket_list_[__p1_.first().__next_->__hash_ % bucket_count()] =
|
__bucket_list_[__p1_.first().__next_->__hash_ % bucket_count()] =
|
||||||
static_cast<__node_pointer>(addressof(__p1_.first()));
|
static_cast<__node_pointer>(_STD::addressof(__p1_.first()));
|
||||||
if (__u.size() > 0)
|
if (__u.size() > 0)
|
||||||
__u.__bucket_list_[__u.__p1_.first().__next_->__hash_ % __u.bucket_count()] =
|
__u.__bucket_list_[__u.__p1_.first().__next_->__hash_ % __u.bucket_count()] =
|
||||||
static_cast<__node_pointer>(addressof(__u.__p1_.first()));
|
static_cast<__node_pointer>(_STD::addressof(__u.__p1_.first()));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||||
|
@ -523,7 +523,7 @@ public:
|
|||||||
void operator()(pointer __p)
|
void operator()(pointer __p)
|
||||||
{
|
{
|
||||||
if (__value_constructed)
|
if (__value_constructed)
|
||||||
__alloc_traits::destroy(__na_, addressof(__p->__value_));
|
__alloc_traits::destroy(__na_, _STD::addressof(__p->__value_));
|
||||||
if (__p)
|
if (__p)
|
||||||
__alloc_traits::deallocate(__na_, __p, 1);
|
__alloc_traits::deallocate(__na_, __p, 1);
|
||||||
}
|
}
|
||||||
@ -1373,7 +1373,7 @@ __tree<_Tp, _Compare, _Allocator>::destroy(__node_pointer __nd)
|
|||||||
destroy(static_cast<__node_pointer>(__nd->__left_));
|
destroy(static_cast<__node_pointer>(__nd->__left_));
|
||||||
destroy(static_cast<__node_pointer>(__nd->__right_));
|
destroy(static_cast<__node_pointer>(__nd->__right_));
|
||||||
__node_allocator& __na = __node_alloc();
|
__node_allocator& __na = __node_alloc();
|
||||||
__node_traits::destroy(__na, addressof(__nd->__value_));
|
__node_traits::destroy(__na, _STD::addressof(__nd->__value_));
|
||||||
__node_traits::deallocate(__na, __nd, 1);
|
__node_traits::deallocate(__na, __nd, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1655,7 +1655,7 @@ __tree<_Tp, _Compare, _Allocator>::__construct_node(_Args&& ...__args)
|
|||||||
{
|
{
|
||||||
__node_allocator& __na = __node_alloc();
|
__node_allocator& __na = __node_alloc();
|
||||||
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
||||||
__node_traits::construct(__na, addressof(__h->__value_), _STD::forward<_Args>(__args)...);
|
__node_traits::construct(__na, _STD::addressof(__h->__value_), _STD::forward<_Args>(__args)...);
|
||||||
__h.get_deleter().__value_constructed = true;
|
__h.get_deleter().__value_constructed = true;
|
||||||
return __h;
|
return __h;
|
||||||
}
|
}
|
||||||
@ -1791,7 +1791,7 @@ __tree<_Tp, _Compare, _Allocator>::__construct_node(const value_type& __v)
|
|||||||
{
|
{
|
||||||
__node_allocator& __na = __node_alloc();
|
__node_allocator& __na = __node_alloc();
|
||||||
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
||||||
__node_traits::construct(__na, addressof(__h->__value_), __v);
|
__node_traits::construct(__na, _STD::addressof(__h->__value_), __v);
|
||||||
__h.get_deleter().__value_constructed = true;
|
__h.get_deleter().__value_constructed = true;
|
||||||
return _STD::move(__h);
|
return _STD::move(__h);
|
||||||
}
|
}
|
||||||
@ -1919,7 +1919,7 @@ __tree<_Tp, _Compare, _Allocator>::erase(const_iterator __p)
|
|||||||
__begin_node() = __r.__ptr_;
|
__begin_node() = __r.__ptr_;
|
||||||
--size();
|
--size();
|
||||||
__node_allocator& __na = __node_alloc();
|
__node_allocator& __na = __node_alloc();
|
||||||
__node_traits::destroy(__na, const_cast<value_type*>(addressof(*__p)));
|
__node_traits::destroy(__na, const_cast<value_type*>(_STD::addressof(*__p)));
|
||||||
__tree_remove(__end_node()->__left_,
|
__tree_remove(__end_node()->__left_,
|
||||||
static_cast<__node_base_pointer>(__np));
|
static_cast<__node_base_pointer>(__np));
|
||||||
__node_traits::deallocate(__na, __np, 1);
|
__node_traits::deallocate(__na, __np, 1);
|
||||||
|
@ -1116,7 +1116,7 @@ __deque_base<_Tp, _Allocator>::clear()
|
|||||||
{
|
{
|
||||||
allocator_type& __a = __alloc();
|
allocator_type& __a = __alloc();
|
||||||
for (iterator __i = begin(), __e = end(); __i != __e; ++__i)
|
for (iterator __i = begin(), __e = end(); __i != __e; ++__i)
|
||||||
__alloc_traits::destroy(__a, addressof(*__i));
|
__alloc_traits::destroy(__a, _STD::addressof(*__i));
|
||||||
size() = 0;
|
size() = 0;
|
||||||
while (__map_.size() > 2)
|
while (__map_.size() > 2)
|
||||||
{
|
{
|
||||||
@ -1675,7 +1675,7 @@ deque<_Tp, _Allocator>::push_back(const value_type& __v)
|
|||||||
if (__back_spare() == 0)
|
if (__back_spare() == 0)
|
||||||
__add_back_capacity();
|
__add_back_capacity();
|
||||||
// __back_spare() >= 1
|
// __back_spare() >= 1
|
||||||
__alloc_traits::construct(__a, addressof(*__base::end()), __v);
|
__alloc_traits::construct(__a, _STD::addressof(*__base::end()), __v);
|
||||||
++__base::size();
|
++__base::size();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1689,7 +1689,7 @@ deque<_Tp, _Allocator>::push_back(value_type&& __v)
|
|||||||
if (__back_spare() == 0)
|
if (__back_spare() == 0)
|
||||||
__add_back_capacity();
|
__add_back_capacity();
|
||||||
// __back_spare() >= 1
|
// __back_spare() >= 1
|
||||||
__alloc_traits::construct(__a, addressof(*__base::end()), _STD::move(__v));
|
__alloc_traits::construct(__a, _STD::addressof(*__base::end()), _STD::move(__v));
|
||||||
++__base::size();
|
++__base::size();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1704,7 +1704,7 @@ deque<_Tp, _Allocator>::emplace_back(_Args&&... __args)
|
|||||||
if (__back_spare() == 0)
|
if (__back_spare() == 0)
|
||||||
__add_back_capacity();
|
__add_back_capacity();
|
||||||
// __back_spare() >= 1
|
// __back_spare() >= 1
|
||||||
__alloc_traits::construct(__a, addressof(*__base::end()), _STD::forward<_Args>(__args)...);
|
__alloc_traits::construct(__a, _STD::addressof(*__base::end()), _STD::forward<_Args>(__args)...);
|
||||||
++__base::size();
|
++__base::size();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1719,7 +1719,7 @@ deque<_Tp, _Allocator>::push_front(const value_type& __v)
|
|||||||
if (__front_spare() == 0)
|
if (__front_spare() == 0)
|
||||||
__add_front_capacity();
|
__add_front_capacity();
|
||||||
// __front_spare() >= 1
|
// __front_spare() >= 1
|
||||||
__alloc_traits::construct(__a, addressof(*--__base::begin()), __v);
|
__alloc_traits::construct(__a, _STD::addressof(*--__base::begin()), __v);
|
||||||
--__base::__start_;
|
--__base::__start_;
|
||||||
++__base::size();
|
++__base::size();
|
||||||
}
|
}
|
||||||
@ -1734,7 +1734,7 @@ deque<_Tp, _Allocator>::push_front(value_type&& __v)
|
|||||||
if (__front_spare() == 0)
|
if (__front_spare() == 0)
|
||||||
__add_front_capacity();
|
__add_front_capacity();
|
||||||
// __front_spare() >= 1
|
// __front_spare() >= 1
|
||||||
__alloc_traits::construct(__a, addressof(*--__base::begin()), _STD::move(__v));
|
__alloc_traits::construct(__a, _STD::addressof(*--__base::begin()), _STD::move(__v));
|
||||||
--__base::__start_;
|
--__base::__start_;
|
||||||
++__base::size();
|
++__base::size();
|
||||||
}
|
}
|
||||||
@ -1750,7 +1750,7 @@ deque<_Tp, _Allocator>::emplace_front(_Args&&... __args)
|
|||||||
if (__front_spare() == 0)
|
if (__front_spare() == 0)
|
||||||
__add_front_capacity();
|
__add_front_capacity();
|
||||||
// __front_spare() >= 1
|
// __front_spare() >= 1
|
||||||
__alloc_traits::construct(__a, addressof(*--__base::begin()), _STD::forward<_Args>(__args)...);
|
__alloc_traits::construct(__a, _STD::addressof(*--__base::begin()), _STD::forward<_Args>(__args)...);
|
||||||
--__base::__start_;
|
--__base::__start_;
|
||||||
++__base::size();
|
++__base::size();
|
||||||
}
|
}
|
||||||
@ -1772,7 +1772,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, const value_type& __v)
|
|||||||
// __front_spare() >= 1
|
// __front_spare() >= 1
|
||||||
if (__pos == 0)
|
if (__pos == 0)
|
||||||
{
|
{
|
||||||
__alloc_traits::construct(__a, addressof(*--__base::begin()), __v);
|
__alloc_traits::construct(__a, _STD::addressof(*--__base::begin()), __v);
|
||||||
--__base::__start_;
|
--__base::__start_;
|
||||||
++__base::size();
|
++__base::size();
|
||||||
}
|
}
|
||||||
@ -1783,7 +1783,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, const value_type& __v)
|
|||||||
iterator __bm1 = prev(__b);
|
iterator __bm1 = prev(__b);
|
||||||
if (__vt == pointer_traits<const_pointer>::pointer_to(*__b))
|
if (__vt == pointer_traits<const_pointer>::pointer_to(*__b))
|
||||||
__vt = pointer_traits<const_pointer>::pointer_to(*__bm1);
|
__vt = pointer_traits<const_pointer>::pointer_to(*__bm1);
|
||||||
__alloc_traits::construct(__a, addressof(*__bm1), _STD::move(*__b));
|
__alloc_traits::construct(__a, _STD::addressof(*__bm1), _STD::move(*__b));
|
||||||
--__base::__start_;
|
--__base::__start_;
|
||||||
++__base::size();
|
++__base::size();
|
||||||
if (__pos > 1)
|
if (__pos > 1)
|
||||||
@ -1799,7 +1799,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, const value_type& __v)
|
|||||||
size_type __de = __base::size() - __pos;
|
size_type __de = __base::size() - __pos;
|
||||||
if (__de == 0)
|
if (__de == 0)
|
||||||
{
|
{
|
||||||
__alloc_traits::construct(__a, addressof(*__base::end()), __v);
|
__alloc_traits::construct(__a, _STD::addressof(*__base::end()), __v);
|
||||||
++__base::size();
|
++__base::size();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1809,7 +1809,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, const value_type& __v)
|
|||||||
iterator __em1 = prev(__e);
|
iterator __em1 = prev(__e);
|
||||||
if (__vt == pointer_traits<const_pointer>::pointer_to(*__em1))
|
if (__vt == pointer_traits<const_pointer>::pointer_to(*__em1))
|
||||||
__vt = pointer_traits<const_pointer>::pointer_to(*__e);
|
__vt = pointer_traits<const_pointer>::pointer_to(*__e);
|
||||||
__alloc_traits::construct(__a, addressof(*__e), _STD::move(*__em1));
|
__alloc_traits::construct(__a, _STD::addressof(*__e), _STD::move(*__em1));
|
||||||
++__base::size();
|
++__base::size();
|
||||||
if (__de > 1)
|
if (__de > 1)
|
||||||
__e = __move_backward_and_check(__e - __de, __em1, __e, __vt);
|
__e = __move_backward_and_check(__e - __de, __em1, __e, __vt);
|
||||||
@ -1835,7 +1835,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, value_type&& __v)
|
|||||||
// __front_spare() >= 1
|
// __front_spare() >= 1
|
||||||
if (__pos == 0)
|
if (__pos == 0)
|
||||||
{
|
{
|
||||||
__alloc_traits::construct(__a, addressof(*--__base::begin()), _STD::move(__v));
|
__alloc_traits::construct(__a, _STD::addressof(*--__base::begin()), _STD::move(__v));
|
||||||
--__base::__start_;
|
--__base::__start_;
|
||||||
++__base::size();
|
++__base::size();
|
||||||
}
|
}
|
||||||
@ -1843,7 +1843,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, value_type&& __v)
|
|||||||
{
|
{
|
||||||
iterator __b = __base::begin();
|
iterator __b = __base::begin();
|
||||||
iterator __bm1 = prev(__b);
|
iterator __bm1 = prev(__b);
|
||||||
__alloc_traits::construct(__a, addressof(*__bm1), _STD::move(*__b));
|
__alloc_traits::construct(__a, _STD::addressof(*__bm1), _STD::move(*__b));
|
||||||
--__base::__start_;
|
--__base::__start_;
|
||||||
++__base::size();
|
++__base::size();
|
||||||
if (__pos > 1)
|
if (__pos > 1)
|
||||||
@ -1859,14 +1859,14 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, value_type&& __v)
|
|||||||
size_type __de = __base::size() - __pos;
|
size_type __de = __base::size() - __pos;
|
||||||
if (__de == 0)
|
if (__de == 0)
|
||||||
{
|
{
|
||||||
__alloc_traits::construct(__a, addressof(*__base::end()), _STD::move(__v));
|
__alloc_traits::construct(__a, _STD::addressof(*__base::end()), _STD::move(__v));
|
||||||
++__base::size();
|
++__base::size();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
iterator __e = __base::end();
|
iterator __e = __base::end();
|
||||||
iterator __em1 = prev(__e);
|
iterator __em1 = prev(__e);
|
||||||
__alloc_traits::construct(__a, addressof(*__e), _STD::move(*__em1));
|
__alloc_traits::construct(__a, _STD::addressof(*__e), _STD::move(*__em1));
|
||||||
++__base::size();
|
++__base::size();
|
||||||
if (__de > 1)
|
if (__de > 1)
|
||||||
__e = _STD::move_backward(__e - __de, __em1, __e);
|
__e = _STD::move_backward(__e - __de, __em1, __e);
|
||||||
@ -1893,7 +1893,7 @@ deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args)
|
|||||||
// __front_spare() >= 1
|
// __front_spare() >= 1
|
||||||
if (__pos == 0)
|
if (__pos == 0)
|
||||||
{
|
{
|
||||||
__alloc_traits::construct(__a, addressof(*--__base::begin()), _STD::forward<_Args>(__args)...);
|
__alloc_traits::construct(__a, _STD::addressof(*--__base::begin()), _STD::forward<_Args>(__args)...);
|
||||||
--__base::__start_;
|
--__base::__start_;
|
||||||
++__base::size();
|
++__base::size();
|
||||||
}
|
}
|
||||||
@ -1901,7 +1901,7 @@ deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args)
|
|||||||
{
|
{
|
||||||
iterator __b = __base::begin();
|
iterator __b = __base::begin();
|
||||||
iterator __bm1 = prev(__b);
|
iterator __bm1 = prev(__b);
|
||||||
__alloc_traits::construct(__a, addressof(*__bm1), _STD::move(*__b));
|
__alloc_traits::construct(__a, _STD::addressof(*__bm1), _STD::move(*__b));
|
||||||
--__base::__start_;
|
--__base::__start_;
|
||||||
++__base::size();
|
++__base::size();
|
||||||
if (__pos > 1)
|
if (__pos > 1)
|
||||||
@ -1917,14 +1917,14 @@ deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args)
|
|||||||
size_type __de = __base::size() - __pos;
|
size_type __de = __base::size() - __pos;
|
||||||
if (__de == 0)
|
if (__de == 0)
|
||||||
{
|
{
|
||||||
__alloc_traits::construct(__a, addressof(*__base::end()), _STD::forward<_Args>(__args)...);
|
__alloc_traits::construct(__a, _STD::addressof(*__base::end()), _STD::forward<_Args>(__args)...);
|
||||||
++__base::size();
|
++__base::size();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
iterator __e = __base::end();
|
iterator __e = __base::end();
|
||||||
iterator __em1 = prev(__e);
|
iterator __em1 = prev(__e);
|
||||||
__alloc_traits::construct(__a, addressof(*__e), _STD::move(*__em1));
|
__alloc_traits::construct(__a, _STD::addressof(*__e), _STD::move(*__em1));
|
||||||
++__base::size();
|
++__base::size();
|
||||||
if (__de > 1)
|
if (__de > 1)
|
||||||
__e = _STD::move_backward(__e - __de, __em1, __e);
|
__e = _STD::move_backward(__e - __de, __em1, __e);
|
||||||
@ -1955,7 +1955,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, size_type __n, const value_ty
|
|||||||
if (__n > __pos)
|
if (__n > __pos)
|
||||||
{
|
{
|
||||||
for (size_type __m = __n - __pos; __m; --__m, --__base::__start_, ++__base::size())
|
for (size_type __m = __n - __pos; __m; --__m, --__base::__start_, ++__base::size())
|
||||||
__alloc_traits::construct(__a, addressof(*--__i), __v);
|
__alloc_traits::construct(__a, _STD::addressof(*--__i), __v);
|
||||||
__n = __pos;
|
__n = __pos;
|
||||||
}
|
}
|
||||||
if (__n > 0)
|
if (__n > 0)
|
||||||
@ -1981,7 +1981,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, size_type __n, const value_ty
|
|||||||
if (__n > __de)
|
if (__n > __de)
|
||||||
{
|
{
|
||||||
for (size_type __m = __n - __de; __m; --__m, ++__i, ++__base::size())
|
for (size_type __m = __n - __de; __m; --__m, ++__i, ++__base::size())
|
||||||
__alloc_traits::construct(__a, addressof(*__i), __v);
|
__alloc_traits::construct(__a, _STD::addressof(*__i), __v);
|
||||||
__n = __de;
|
__n = __de;
|
||||||
}
|
}
|
||||||
if (__n > 0)
|
if (__n > 0)
|
||||||
@ -2033,7 +2033,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, _BiIter __f, _BiIter __l,
|
|||||||
{
|
{
|
||||||
__m = __pos < __n / 2 ? _STD::prev(__l, __pos) : _STD::next(__f, __n - __pos);
|
__m = __pos < __n / 2 ? _STD::prev(__l, __pos) : _STD::next(__f, __n - __pos);
|
||||||
for (_BiIter __j = __m; __j != __f; --__base::__start_, ++__base::size())
|
for (_BiIter __j = __m; __j != __f; --__base::__start_, ++__base::size())
|
||||||
__alloc_traits::construct(__a, addressof(*--__i), *--__j);
|
__alloc_traits::construct(__a, _STD::addressof(*--__i), *--__j);
|
||||||
__n = __pos;
|
__n = __pos;
|
||||||
}
|
}
|
||||||
if (__n > 0)
|
if (__n > 0)
|
||||||
@ -2041,7 +2041,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, _BiIter __f, _BiIter __l,
|
|||||||
iterator __obn = __old_begin + __n;
|
iterator __obn = __old_begin + __n;
|
||||||
for (iterator __j = __obn; __j != __old_begin;)
|
for (iterator __j = __obn; __j != __old_begin;)
|
||||||
{
|
{
|
||||||
__alloc_traits::construct(__a, addressof(*--__i), _STD::move(*--__j));
|
__alloc_traits::construct(__a, _STD::addressof(*--__i), _STD::move(*--__j));
|
||||||
--__base::__start_;
|
--__base::__start_;
|
||||||
++__base::size();
|
++__base::size();
|
||||||
}
|
}
|
||||||
@ -2065,14 +2065,14 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, _BiIter __f, _BiIter __l,
|
|||||||
{
|
{
|
||||||
__m = __de < __n / 2 ? _STD::next(__f, __de) : _STD::prev(__l, __n - __de);
|
__m = __de < __n / 2 ? _STD::next(__f, __de) : _STD::prev(__l, __n - __de);
|
||||||
for (_BiIter __j = __m; __j != __l; ++__i, ++__j, ++__base::size())
|
for (_BiIter __j = __m; __j != __l; ++__i, ++__j, ++__base::size())
|
||||||
__alloc_traits::construct(__a, addressof(*__i), *__j);
|
__alloc_traits::construct(__a, _STD::addressof(*__i), *__j);
|
||||||
__n = __de;
|
__n = __de;
|
||||||
}
|
}
|
||||||
if (__n > 0)
|
if (__n > 0)
|
||||||
{
|
{
|
||||||
iterator __oen = __old_end - __n;
|
iterator __oen = __old_end - __n;
|
||||||
for (iterator __j = __oen; __j != __old_end; ++__i, ++__j, ++__base::size())
|
for (iterator __j = __oen; __j != __old_end; ++__i, ++__j, ++__base::size())
|
||||||
__alloc_traits::construct(__a, addressof(*__i), _STD::move(*__j));
|
__alloc_traits::construct(__a, _STD::addressof(*__i), _STD::move(*__j));
|
||||||
if (__n < __de)
|
if (__n < __de)
|
||||||
__old_end = _STD::move_backward(__old_end - __de, __oen, __old_end);
|
__old_end = _STD::move_backward(__old_end - __de, __oen, __old_end);
|
||||||
_STD::copy_backward(__f, __m, __old_end);
|
_STD::copy_backward(__f, __m, __old_end);
|
||||||
@ -2105,7 +2105,7 @@ deque<_Tp, _Allocator>::__append(_ForIter __f, _ForIter __l,
|
|||||||
__add_back_capacity(__n - __back_capacity);
|
__add_back_capacity(__n - __back_capacity);
|
||||||
// __n <= __back_capacity
|
// __n <= __back_capacity
|
||||||
for (iterator __i = __base::end(); __f != __l; ++__i, ++__f, ++__base::size())
|
for (iterator __i = __base::end(); __f != __l; ++__i, ++__f, ++__base::size())
|
||||||
__alloc_traits::construct(__a, addressof(*__i), *__f);
|
__alloc_traits::construct(__a, _STD::addressof(*__i), *__f);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class _Tp, class _Allocator>
|
template <class _Tp, class _Allocator>
|
||||||
@ -2118,7 +2118,7 @@ deque<_Tp, _Allocator>::__append(size_type __n)
|
|||||||
__add_back_capacity(__n - __back_capacity);
|
__add_back_capacity(__n - __back_capacity);
|
||||||
// __n <= __back_capacity
|
// __n <= __back_capacity
|
||||||
for (iterator __i = __base::end(); __n; --__n, ++__i, ++__base::size())
|
for (iterator __i = __base::end(); __n; --__n, ++__i, ++__base::size())
|
||||||
__alloc_traits::construct(__a, addressof(*__i));
|
__alloc_traits::construct(__a, _STD::addressof(*__i));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class _Tp, class _Allocator>
|
template <class _Tp, class _Allocator>
|
||||||
@ -2131,7 +2131,7 @@ deque<_Tp, _Allocator>::__append(size_type __n, const value_type& __v)
|
|||||||
__add_back_capacity(__n - __back_capacity);
|
__add_back_capacity(__n - __back_capacity);
|
||||||
// __n <= __back_capacity
|
// __n <= __back_capacity
|
||||||
for (iterator __i = __base::end(); __n; --__n, ++__i, ++__base::size())
|
for (iterator __i = __base::end(); __n; --__n, ++__i, ++__base::size())
|
||||||
__alloc_traits::construct(__a, addressof(*__i), __v);
|
__alloc_traits::construct(__a, _STD::addressof(*__i), __v);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create front capacity for one block of elements.
|
// Create front capacity for one block of elements.
|
||||||
@ -2536,7 +2536,7 @@ deque<_Tp, _Allocator>::__move_construct_and_check(iterator __f, iterator __l,
|
|||||||
allocator_type& __a = __base::__alloc();
|
allocator_type& __a = __base::__alloc();
|
||||||
// as if
|
// as if
|
||||||
// for (; __f != __l; ++__r, ++__f, ++__base::size())
|
// for (; __f != __l; ++__r, ++__f, ++__base::size())
|
||||||
// __alloc_traits::construct(__a, addressof(*__r), _STD::move(*__f));
|
// __alloc_traits::construct(__a, _STD::addressof(*__r), _STD::move(*__f));
|
||||||
difference_type __n = __l - __f;
|
difference_type __n = __l - __f;
|
||||||
while (__n > 0)
|
while (__n > 0)
|
||||||
{
|
{
|
||||||
@ -2551,7 +2551,7 @@ deque<_Tp, _Allocator>::__move_construct_and_check(iterator __f, iterator __l,
|
|||||||
if (__fb <= __vt && __vt < __fe)
|
if (__fb <= __vt && __vt < __fe)
|
||||||
__vt = (const_iterator(__f.__m_iter_, __vt) += __r - __f).__ptr_;
|
__vt = (const_iterator(__f.__m_iter_, __vt) += __r - __f).__ptr_;
|
||||||
for (; __fb != __fe; ++__fb, ++__r, ++__base::size())
|
for (; __fb != __fe; ++__fb, ++__r, ++__base::size())
|
||||||
__alloc_traits::construct(__a, addressof(*__r), _STD::move(*__fb));
|
__alloc_traits::construct(__a, _STD::addressof(*__r), _STD::move(*__fb));
|
||||||
__n -= __bs;
|
__n -= __bs;
|
||||||
__f += __bs;
|
__f += __bs;
|
||||||
}
|
}
|
||||||
@ -2568,7 +2568,7 @@ deque<_Tp, _Allocator>::__move_construct_backward_and_check(iterator __f, iterat
|
|||||||
// as if
|
// as if
|
||||||
// for (iterator __j = __l; __j != __f;)
|
// for (iterator __j = __l; __j != __f;)
|
||||||
// {
|
// {
|
||||||
// __alloc_traitsconstruct(__a, addressof(*--__r), _STD::move(*--__j));
|
// __alloc_traitsconstruct(__a, _STD::addressof(*--__r), _STD::move(*--__j));
|
||||||
// --__base::__start_;
|
// --__base::__start_;
|
||||||
// ++__base::size();
|
// ++__base::size();
|
||||||
// }
|
// }
|
||||||
@ -2588,7 +2588,7 @@ deque<_Tp, _Allocator>::__move_construct_backward_and_check(iterator __f, iterat
|
|||||||
__vt = (const_iterator(__l.__m_iter_, __vt) -= __l - __r + 1).__ptr_;
|
__vt = (const_iterator(__l.__m_iter_, __vt) -= __l - __r + 1).__ptr_;
|
||||||
while (__le != __lb)
|
while (__le != __lb)
|
||||||
{
|
{
|
||||||
__alloc_traits::construct(__a, addressof(*--__r), _STD::move(*--__le));
|
__alloc_traits::construct(__a, _STD::addressof(*--__r), _STD::move(*--__le));
|
||||||
--__base::__start_;
|
--__base::__start_;
|
||||||
++__base::size();
|
++__base::size();
|
||||||
}
|
}
|
||||||
@ -2609,7 +2609,7 @@ deque<_Tp, _Allocator>::erase(const_iterator __f)
|
|||||||
if (__pos < (__base::size() - 1) / 2)
|
if (__pos < (__base::size() - 1) / 2)
|
||||||
{ // erase from front
|
{ // erase from front
|
||||||
_STD::move_backward(__b, __p, next(__p));
|
_STD::move_backward(__b, __p, next(__p));
|
||||||
__alloc_traits::destroy(__a, addressof(*__b));
|
__alloc_traits::destroy(__a, _STD::addressof(*__b));
|
||||||
--__base::size();
|
--__base::size();
|
||||||
++__base::__start_;
|
++__base::__start_;
|
||||||
if (__front_spare() >= 2 * __base::__block_size)
|
if (__front_spare() >= 2 * __base::__block_size)
|
||||||
@ -2622,7 +2622,7 @@ deque<_Tp, _Allocator>::erase(const_iterator __f)
|
|||||||
else
|
else
|
||||||
{ // erase from back
|
{ // erase from back
|
||||||
iterator __i = _STD::move(next(__p), __base::end(), __p);
|
iterator __i = _STD::move(next(__p), __base::end(), __p);
|
||||||
__alloc_traits::destroy(__a, addressof(*__i));
|
__alloc_traits::destroy(__a, _STD::addressof(*__i));
|
||||||
--__base::size();
|
--__base::size();
|
||||||
if (__back_spare() >= 2 * __base::__block_size)
|
if (__back_spare() >= 2 * __base::__block_size)
|
||||||
{
|
{
|
||||||
@ -2648,7 +2648,7 @@ deque<_Tp, _Allocator>::erase(const_iterator __f, const_iterator __l)
|
|||||||
{ // erase from front
|
{ // erase from front
|
||||||
iterator __i = _STD::move_backward(__b, __p, __p + __n);
|
iterator __i = _STD::move_backward(__b, __p, __p + __n);
|
||||||
for (; __b != __i; ++__b)
|
for (; __b != __i; ++__b)
|
||||||
__alloc_traits::destroy(__a, addressof(*__b));
|
__alloc_traits::destroy(__a, _STD::addressof(*__b));
|
||||||
__base::size() -= __n;
|
__base::size() -= __n;
|
||||||
__base::__start_ += __n;
|
__base::__start_ += __n;
|
||||||
while (__front_spare() >= 2 * __base::__block_size)
|
while (__front_spare() >= 2 * __base::__block_size)
|
||||||
@ -2662,7 +2662,7 @@ deque<_Tp, _Allocator>::erase(const_iterator __f, const_iterator __l)
|
|||||||
{ // erase from back
|
{ // erase from back
|
||||||
iterator __i = _STD::move(__p + __n, __base::end(), __p);
|
iterator __i = _STD::move(__p + __n, __base::end(), __p);
|
||||||
for (iterator __e = __base::end(); __i != __e; ++__i)
|
for (iterator __e = __base::end(); __i != __e; ++__i)
|
||||||
__alloc_traits::destroy(__a, addressof(*__i));
|
__alloc_traits::destroy(__a, _STD::addressof(*__i));
|
||||||
__base::size() -= __n;
|
__base::size() -= __n;
|
||||||
while (__back_spare() >= 2 * __base::__block_size)
|
while (__back_spare() >= 2 * __base::__block_size)
|
||||||
{
|
{
|
||||||
@ -2686,7 +2686,7 @@ deque<_Tp, _Allocator>::__erase_to_end(const_iterator __f)
|
|||||||
iterator __b = __base::begin();
|
iterator __b = __base::begin();
|
||||||
difference_type __pos = __f - __b;
|
difference_type __pos = __f - __b;
|
||||||
for (iterator __p = __b + __pos; __p != __e; ++__p)
|
for (iterator __p = __b + __pos; __p != __e; ++__p)
|
||||||
__alloc_traits::destroy(__a, addressof(*__p));
|
__alloc_traits::destroy(__a, _STD::addressof(*__p));
|
||||||
__base::size() -= __n;
|
__base::size() -= __n;
|
||||||
while (__back_spare() >= 2 * __base::__block_size)
|
while (__back_spare() >= 2 * __base::__block_size)
|
||||||
{
|
{
|
||||||
|
@ -341,9 +341,9 @@ public:
|
|||||||
void operator()(pointer __p)
|
void operator()(pointer __p)
|
||||||
{
|
{
|
||||||
if (__second_constructed)
|
if (__second_constructed)
|
||||||
__alloc_traits::destroy(__na_, addressof(__p->__value_.second));
|
__alloc_traits::destroy(__na_, _STD::addressof(__p->__value_.second));
|
||||||
if (__first_constructed)
|
if (__first_constructed)
|
||||||
__alloc_traits::destroy(__na_, addressof(__p->__value_.first));
|
__alloc_traits::destroy(__na_, _STD::addressof(__p->__value_.first));
|
||||||
if (__p)
|
if (__p)
|
||||||
__alloc_traits::deallocate(__na_, __p, 1);
|
__alloc_traits::deallocate(__na_, __p, 1);
|
||||||
}
|
}
|
||||||
@ -666,9 +666,9 @@ hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node(const key_type& __k)
|
|||||||
{
|
{
|
||||||
__node_allocator& __na = __table_.__node_alloc();
|
__node_allocator& __na = __table_.__node_alloc();
|
||||||
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
||||||
__node_traits::construct(__na, addressof(__h->__value_.first), __k);
|
__node_traits::construct(__na, _STD::addressof(__h->__value_.first), __k);
|
||||||
__h.get_deleter().__first_constructed = true;
|
__h.get_deleter().__first_constructed = true;
|
||||||
__node_traits::construct(__na, addressof(__h->__value_.second));
|
__node_traits::construct(__na, _STD::addressof(__h->__value_.second));
|
||||||
__h.get_deleter().__second_constructed = true;
|
__h.get_deleter().__second_constructed = true;
|
||||||
return _STD::move(__h);
|
return _STD::move(__h);
|
||||||
}
|
}
|
||||||
|
@ -492,7 +492,7 @@ __forward_list_base<_Tp, _Alloc>::clear()
|
|||||||
for (__node_pointer __p = __before_begin()->__next_; __p != nullptr;)
|
for (__node_pointer __p = __before_begin()->__next_; __p != nullptr;)
|
||||||
{
|
{
|
||||||
__node_pointer __next = __p->__next_;
|
__node_pointer __next = __p->__next_;
|
||||||
__node_traits::destroy(__a, addressof(__p->__value_));
|
__node_traits::destroy(__a, _STD::addressof(__p->__value_));
|
||||||
__node_traits::deallocate(__a, __p, 1);
|
__node_traits::deallocate(__a, __p, 1);
|
||||||
__p = __next;
|
__p = __next;
|
||||||
}
|
}
|
||||||
@ -712,7 +712,7 @@ forward_list<_Tp, _Alloc>::forward_list(size_type __n)
|
|||||||
__p = __p->__next_)
|
__p = __p->__next_)
|
||||||
{
|
{
|
||||||
__h.reset(__node_traits::allocate(__a, 1));
|
__h.reset(__node_traits::allocate(__a, 1));
|
||||||
__node_traits::construct(__a, addressof(__h->__value_));
|
__node_traits::construct(__a, _STD::addressof(__h->__value_));
|
||||||
__h->__next_ = nullptr;
|
__h->__next_ = nullptr;
|
||||||
__p->__next_ = __h.release();
|
__p->__next_ = __h.release();
|
||||||
}
|
}
|
||||||
@ -915,7 +915,7 @@ forward_list<_Tp, _Alloc>::emplace_front(_Args&&... __args)
|
|||||||
__node_allocator& __a = base::__alloc();
|
__node_allocator& __a = base::__alloc();
|
||||||
typedef __allocator_destructor<__node_allocator> _D;
|
typedef __allocator_destructor<__node_allocator> _D;
|
||||||
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
|
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
|
||||||
__node_traits::construct(__a, addressof(__h->__value_),
|
__node_traits::construct(__a, _STD::addressof(__h->__value_),
|
||||||
_STD::forward<_Args>(__args)...);
|
_STD::forward<_Args>(__args)...);
|
||||||
__h->__next_ = base::__before_begin()->__next_;
|
__h->__next_ = base::__before_begin()->__next_;
|
||||||
base::__before_begin()->__next_ = __h.release();
|
base::__before_begin()->__next_ = __h.release();
|
||||||
@ -930,7 +930,7 @@ forward_list<_Tp, _Alloc>::push_front(value_type&& __v)
|
|||||||
__node_allocator& __a = base::__alloc();
|
__node_allocator& __a = base::__alloc();
|
||||||
typedef __allocator_destructor<__node_allocator> _D;
|
typedef __allocator_destructor<__node_allocator> _D;
|
||||||
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
|
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
|
||||||
__node_traits::construct(__a, addressof(__h->__value_), _STD::move(__v));
|
__node_traits::construct(__a, _STD::addressof(__h->__value_), _STD::move(__v));
|
||||||
__h->__next_ = base::__before_begin()->__next_;
|
__h->__next_ = base::__before_begin()->__next_;
|
||||||
base::__before_begin()->__next_ = __h.release();
|
base::__before_begin()->__next_ = __h.release();
|
||||||
}
|
}
|
||||||
@ -944,7 +944,7 @@ forward_list<_Tp, _Alloc>::push_front(const value_type& __v)
|
|||||||
__node_allocator& __a = base::__alloc();
|
__node_allocator& __a = base::__alloc();
|
||||||
typedef __allocator_destructor<__node_allocator> _D;
|
typedef __allocator_destructor<__node_allocator> _D;
|
||||||
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
|
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
|
||||||
__node_traits::construct(__a, addressof(__h->__value_), __v);
|
__node_traits::construct(__a, _STD::addressof(__h->__value_), __v);
|
||||||
__h->__next_ = base::__before_begin()->__next_;
|
__h->__next_ = base::__before_begin()->__next_;
|
||||||
base::__before_begin()->__next_ = __h.release();
|
base::__before_begin()->__next_ = __h.release();
|
||||||
}
|
}
|
||||||
@ -956,7 +956,7 @@ forward_list<_Tp, _Alloc>::pop_front()
|
|||||||
__node_allocator& __a = base::__alloc();
|
__node_allocator& __a = base::__alloc();
|
||||||
__node_pointer __p = base::__before_begin()->__next_;
|
__node_pointer __p = base::__before_begin()->__next_;
|
||||||
base::__before_begin()->__next_ = __p->__next_;
|
base::__before_begin()->__next_ = __p->__next_;
|
||||||
__node_traits::destroy(__a, addressof(__p->__value_));
|
__node_traits::destroy(__a, _STD::addressof(__p->__value_));
|
||||||
__node_traits::deallocate(__a, __p, 1);
|
__node_traits::deallocate(__a, __p, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -972,7 +972,7 @@ forward_list<_Tp, _Alloc>::emplace_after(const_iterator __p, _Args&&... __args)
|
|||||||
__node_allocator& __a = base::__alloc();
|
__node_allocator& __a = base::__alloc();
|
||||||
typedef __allocator_destructor<__node_allocator> _D;
|
typedef __allocator_destructor<__node_allocator> _D;
|
||||||
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
|
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
|
||||||
__node_traits::construct(__a, addressof(__h->__value_),
|
__node_traits::construct(__a, _STD::addressof(__h->__value_),
|
||||||
_STD::forward<_Args>(__args)...);
|
_STD::forward<_Args>(__args)...);
|
||||||
__h->__next_ = __r->__next_;
|
__h->__next_ = __r->__next_;
|
||||||
__r->__next_ = __h.release();
|
__r->__next_ = __h.release();
|
||||||
@ -989,7 +989,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, value_type&& __v)
|
|||||||
__node_allocator& __a = base::__alloc();
|
__node_allocator& __a = base::__alloc();
|
||||||
typedef __allocator_destructor<__node_allocator> _D;
|
typedef __allocator_destructor<__node_allocator> _D;
|
||||||
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
|
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
|
||||||
__node_traits::construct(__a, addressof(__h->__value_), _STD::move(__v));
|
__node_traits::construct(__a, _STD::addressof(__h->__value_), _STD::move(__v));
|
||||||
__h->__next_ = __r->__next_;
|
__h->__next_ = __r->__next_;
|
||||||
__r->__next_ = __h.release();
|
__r->__next_ = __h.release();
|
||||||
return iterator(__r->__next_);
|
return iterator(__r->__next_);
|
||||||
@ -1005,7 +1005,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, const value_type& __
|
|||||||
__node_allocator& __a = base::__alloc();
|
__node_allocator& __a = base::__alloc();
|
||||||
typedef __allocator_destructor<__node_allocator> _D;
|
typedef __allocator_destructor<__node_allocator> _D;
|
||||||
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
|
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
|
||||||
__node_traits::construct(__a, addressof(__h->__value_), __v);
|
__node_traits::construct(__a, _STD::addressof(__h->__value_), __v);
|
||||||
__h->__next_ = __r->__next_;
|
__h->__next_ = __r->__next_;
|
||||||
__r->__next_ = __h.release();
|
__r->__next_ = __h.release();
|
||||||
return iterator(__r->__next_);
|
return iterator(__r->__next_);
|
||||||
@ -1022,7 +1022,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, size_type __n,
|
|||||||
__node_allocator& __a = base::__alloc();
|
__node_allocator& __a = base::__alloc();
|
||||||
typedef __allocator_destructor<__node_allocator> _D;
|
typedef __allocator_destructor<__node_allocator> _D;
|
||||||
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
|
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
|
||||||
__node_traits::construct(__a, addressof(__h->__value_), __v);
|
__node_traits::construct(__a, _STD::addressof(__h->__value_), __v);
|
||||||
__node_pointer __first = __h.release();
|
__node_pointer __first = __h.release();
|
||||||
__node_pointer __last = __first;
|
__node_pointer __last = __first;
|
||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||||
@ -1032,7 +1032,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, size_type __n,
|
|||||||
for (--__n; __n != 0; --__n, __last = __last->__next_)
|
for (--__n; __n != 0; --__n, __last = __last->__next_)
|
||||||
{
|
{
|
||||||
__h.reset(__node_traits::allocate(__a, 1));
|
__h.reset(__node_traits::allocate(__a, 1));
|
||||||
__node_traits::construct(__a, addressof(__h->__value_), __v);
|
__node_traits::construct(__a, _STD::addressof(__h->__value_), __v);
|
||||||
__last->__next_ = __h.release();
|
__last->__next_ = __h.release();
|
||||||
}
|
}
|
||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||||
@ -1042,7 +1042,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, size_type __n,
|
|||||||
while (__first != nullptr)
|
while (__first != nullptr)
|
||||||
{
|
{
|
||||||
__node_pointer __next = __first->__next_;
|
__node_pointer __next = __first->__next_;
|
||||||
__node_traits::destroy(__a, addressof(__first->__value_));
|
__node_traits::destroy(__a, _STD::addressof(__first->__value_));
|
||||||
__node_traits::deallocate(__a, __first, 1);
|
__node_traits::deallocate(__a, __first, 1);
|
||||||
__first = __next;
|
__first = __next;
|
||||||
}
|
}
|
||||||
@ -1072,7 +1072,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p,
|
|||||||
__node_allocator& __a = base::__alloc();
|
__node_allocator& __a = base::__alloc();
|
||||||
typedef __allocator_destructor<__node_allocator> _D;
|
typedef __allocator_destructor<__node_allocator> _D;
|
||||||
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
|
unique_ptr<__node, _D> __h(__node_traits::allocate(__a, 1), _D(__a, 1));
|
||||||
__node_traits::construct(__a, addressof(__h->__value_), *__f);
|
__node_traits::construct(__a, _STD::addressof(__h->__value_), *__f);
|
||||||
__node_pointer __first = __h.release();
|
__node_pointer __first = __h.release();
|
||||||
__node_pointer __last = __first;
|
__node_pointer __last = __first;
|
||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||||
@ -1082,7 +1082,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p,
|
|||||||
for (++__f; __f != __l; ++__f, __last = __last->__next_)
|
for (++__f; __f != __l; ++__f, __last = __last->__next_)
|
||||||
{
|
{
|
||||||
__h.reset(__node_traits::allocate(__a, 1));
|
__h.reset(__node_traits::allocate(__a, 1));
|
||||||
__node_traits::construct(__a, addressof(__h->__value_), *__f);
|
__node_traits::construct(__a, _STD::addressof(__h->__value_), *__f);
|
||||||
__last->__next_ = __h.release();
|
__last->__next_ = __h.release();
|
||||||
}
|
}
|
||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||||
@ -1092,7 +1092,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p,
|
|||||||
while (__first != nullptr)
|
while (__first != nullptr)
|
||||||
{
|
{
|
||||||
__node_pointer __next = __first->__next_;
|
__node_pointer __next = __first->__next_;
|
||||||
__node_traits::destroy(__a, addressof(__first->__value_));
|
__node_traits::destroy(__a, _STD::addressof(__first->__value_));
|
||||||
__node_traits::deallocate(__a, __first, 1);
|
__node_traits::deallocate(__a, __first, 1);
|
||||||
__first = __next;
|
__first = __next;
|
||||||
}
|
}
|
||||||
@ -1114,7 +1114,7 @@ forward_list<_Tp, _Alloc>::erase_after(const_iterator __f)
|
|||||||
__node_pointer __n = __p->__next_;
|
__node_pointer __n = __p->__next_;
|
||||||
__p->__next_ = __n->__next_;
|
__p->__next_ = __n->__next_;
|
||||||
__node_allocator& __a = base::__alloc();
|
__node_allocator& __a = base::__alloc();
|
||||||
__node_traits::destroy(__a, addressof(__n->__value_));
|
__node_traits::destroy(__a, _STD::addressof(__n->__value_));
|
||||||
__node_traits::deallocate(__a, __n, 1);
|
__node_traits::deallocate(__a, __n, 1);
|
||||||
return iterator(__p->__next_);
|
return iterator(__p->__next_);
|
||||||
}
|
}
|
||||||
@ -1135,7 +1135,7 @@ forward_list<_Tp, _Alloc>::erase_after(const_iterator __f, const_iterator __l)
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
__p = __n->__next_;
|
__p = __n->__next_;
|
||||||
__node_traits::destroy(__a, addressof(__n->__value_));
|
__node_traits::destroy(__a, _STD::addressof(__n->__value_));
|
||||||
__node_traits::deallocate(__a, __n, 1);
|
__node_traits::deallocate(__a, __n, 1);
|
||||||
__n = __p;
|
__n = __p;
|
||||||
} while (__n != __e);
|
} while (__n != __e);
|
||||||
@ -1168,7 +1168,7 @@ forward_list<_Tp, _Alloc>::resize(size_type __n)
|
|||||||
__ptr = __ptr->__next_)
|
__ptr = __ptr->__next_)
|
||||||
{
|
{
|
||||||
__h.reset(__node_traits::allocate(__a, 1));
|
__h.reset(__node_traits::allocate(__a, 1));
|
||||||
__node_traits::construct(__a, addressof(__h->__value_));
|
__node_traits::construct(__a, _STD::addressof(__h->__value_));
|
||||||
__h->__next_ = nullptr;
|
__h->__next_ = nullptr;
|
||||||
__ptr->__next_ = __h.release();
|
__ptr->__next_ = __h.release();
|
||||||
}
|
}
|
||||||
@ -1200,7 +1200,7 @@ forward_list<_Tp, _Alloc>::resize(size_type __n, const value_type& __v)
|
|||||||
__ptr = __ptr->__next_)
|
__ptr = __ptr->__next_)
|
||||||
{
|
{
|
||||||
__h.reset(__node_traits::allocate(__a, 1));
|
__h.reset(__node_traits::allocate(__a, 1));
|
||||||
__node_traits::construct(__a, addressof(__h->__value_), __v);
|
__node_traits::construct(__a, _STD::addressof(__h->__value_), __v);
|
||||||
__h->__next_ = nullptr;
|
__h->__next_ = nullptr;
|
||||||
__ptr->__next_ = __h.release();
|
__ptr->__next_ = __h.release();
|
||||||
}
|
}
|
||||||
|
62
include/list
62
include/list
@ -473,8 +473,8 @@ __list_imp<_Tp, _Alloc>::clear()
|
|||||||
{
|
{
|
||||||
__node& __n = *__f.__ptr_;
|
__node& __n = *__f.__ptr_;
|
||||||
++__f;
|
++__f;
|
||||||
__node_alloc_traits::destroy(__na, addressof(__n.__value_));
|
__node_alloc_traits::destroy(__na, _STD::addressof(__n.__value_));
|
||||||
__node_alloc_traits::deallocate(__na, addressof(__n), 1);
|
__node_alloc_traits::deallocate(__na, _STD::addressof(__n), 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -915,7 +915,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, const value_type& __x)
|
|||||||
typedef __allocator_destructor<__node_allocator> _D;
|
typedef __allocator_destructor<__node_allocator> _D;
|
||||||
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
||||||
__hold->__prev_ = 0;
|
__hold->__prev_ = 0;
|
||||||
__node_alloc_traits::construct(__na, addressof(__hold->__value_), __x);
|
__node_alloc_traits::construct(__na, _STD::addressof(__hold->__value_), __x);
|
||||||
__link_nodes(const_cast<__node&>(*__p.__ptr_), *__hold, *__hold);
|
__link_nodes(const_cast<__node&>(*__p.__ptr_), *__hold, *__hold);
|
||||||
++base::__sz();
|
++base::__sz();
|
||||||
return iterator(__hold.release());
|
return iterator(__hold.release());
|
||||||
@ -933,7 +933,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, size_type __n, const value_type& _
|
|||||||
typedef __allocator_destructor<__node_allocator> _D;
|
typedef __allocator_destructor<__node_allocator> _D;
|
||||||
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
||||||
__hold->__prev_ = 0;
|
__hold->__prev_ = 0;
|
||||||
__node_alloc_traits::construct(__na, addressof(__hold->__value_), __x);
|
__node_alloc_traits::construct(__na, _STD::addressof(__hold->__value_), __x);
|
||||||
++__ds;
|
++__ds;
|
||||||
__r = iterator(__hold.get());
|
__r = iterator(__hold.get());
|
||||||
__hold.release();
|
__hold.release();
|
||||||
@ -945,7 +945,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, size_type __n, const value_type& _
|
|||||||
for (--__n; __n != 0; --__n, ++__e, ++__ds)
|
for (--__n; __n != 0; --__n, ++__e, ++__ds)
|
||||||
{
|
{
|
||||||
__hold.reset(__node_alloc_traits::allocate(__na, 1));
|
__hold.reset(__node_alloc_traits::allocate(__na, 1));
|
||||||
__node_alloc_traits::construct(__na, addressof(__hold->__value_), __x);
|
__node_alloc_traits::construct(__na, _STD::addressof(__hold->__value_), __x);
|
||||||
__e.__ptr_->__next_ = __hold.get();
|
__e.__ptr_->__next_ = __hold.get();
|
||||||
__hold->__prev_ = __e.__ptr_;
|
__hold->__prev_ = __e.__ptr_;
|
||||||
__hold.release();
|
__hold.release();
|
||||||
@ -956,7 +956,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, size_type __n, const value_type& _
|
|||||||
{
|
{
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
__node_alloc_traits::destroy(__na, addressof(*__e));
|
__node_alloc_traits::destroy(__na, _STD::addressof(*__e));
|
||||||
__node_pointer __prev = __e.__ptr_->__prev_;
|
__node_pointer __prev = __e.__ptr_->__prev_;
|
||||||
__node_alloc_traits::deallocate(__na, __e.__ptr_, 1);
|
__node_alloc_traits::deallocate(__na, __e.__ptr_, 1);
|
||||||
if (__prev == 0)
|
if (__prev == 0)
|
||||||
@ -986,7 +986,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, _InpIter __f, _InpIter __l,
|
|||||||
typedef __allocator_destructor<__node_allocator> _D;
|
typedef __allocator_destructor<__node_allocator> _D;
|
||||||
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
||||||
__hold->__prev_ = 0;
|
__hold->__prev_ = 0;
|
||||||
__node_alloc_traits::construct(__na, addressof(__hold->__value_), *__f);
|
__node_alloc_traits::construct(__na, _STD::addressof(__hold->__value_), *__f);
|
||||||
++__ds;
|
++__ds;
|
||||||
__r = iterator(__hold.get());
|
__r = iterator(__hold.get());
|
||||||
__hold.release();
|
__hold.release();
|
||||||
@ -998,7 +998,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, _InpIter __f, _InpIter __l,
|
|||||||
for (++__f; __f != __l; ++__f, ++__e, ++__ds)
|
for (++__f; __f != __l; ++__f, ++__e, ++__ds)
|
||||||
{
|
{
|
||||||
__hold.reset(__node_alloc_traits::allocate(__na, 1));
|
__hold.reset(__node_alloc_traits::allocate(__na, 1));
|
||||||
__node_alloc_traits::construct(__na, addressof(__hold->__value_), *__f);
|
__node_alloc_traits::construct(__na, _STD::addressof(__hold->__value_), *__f);
|
||||||
__e.__ptr_->__next_ = __hold.get();
|
__e.__ptr_->__next_ = __hold.get();
|
||||||
__hold->__prev_ = __e.__ptr_;
|
__hold->__prev_ = __e.__ptr_;
|
||||||
__hold.release();
|
__hold.release();
|
||||||
@ -1009,7 +1009,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, _InpIter __f, _InpIter __l,
|
|||||||
{
|
{
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
__node_alloc_traits::destroy(__na, addressof(*__e));
|
__node_alloc_traits::destroy(__na, _STD::addressof(*__e));
|
||||||
__node_pointer __prev = __e.__ptr_->__prev_;
|
__node_pointer __prev = __e.__ptr_->__prev_;
|
||||||
__node_alloc_traits::deallocate(__na, __e.__ptr_, 1);
|
__node_alloc_traits::deallocate(__na, __e.__ptr_, 1);
|
||||||
if (__prev == 0)
|
if (__prev == 0)
|
||||||
@ -1032,7 +1032,7 @@ list<_Tp, _Alloc>::push_front(const value_type& __x)
|
|||||||
__node_allocator& __na = base::__node_alloc();
|
__node_allocator& __na = base::__node_alloc();
|
||||||
typedef __allocator_destructor<__node_allocator> _D;
|
typedef __allocator_destructor<__node_allocator> _D;
|
||||||
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
||||||
__node_alloc_traits::construct(__na, addressof(__hold->__value_), __x);
|
__node_alloc_traits::construct(__na, _STD::addressof(__hold->__value_), __x);
|
||||||
__link_nodes(*base::__end_.__next_, *__hold, *__hold);
|
__link_nodes(*base::__end_.__next_, *__hold, *__hold);
|
||||||
++base::__sz();
|
++base::__sz();
|
||||||
__hold.release();
|
__hold.release();
|
||||||
@ -1045,7 +1045,7 @@ list<_Tp, _Alloc>::push_back(const value_type& __x)
|
|||||||
__node_allocator& __na = base::__node_alloc();
|
__node_allocator& __na = base::__node_alloc();
|
||||||
typedef __allocator_destructor<__node_allocator> _D;
|
typedef __allocator_destructor<__node_allocator> _D;
|
||||||
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
||||||
__node_alloc_traits::construct(__na, addressof(__hold->__value_), __x);
|
__node_alloc_traits::construct(__na, _STD::addressof(__hold->__value_), __x);
|
||||||
__link_nodes(static_cast<__node&>(base::__end_), *__hold, *__hold);
|
__link_nodes(static_cast<__node&>(base::__end_), *__hold, *__hold);
|
||||||
++base::__sz();
|
++base::__sz();
|
||||||
__hold.release();
|
__hold.release();
|
||||||
@ -1060,7 +1060,7 @@ list<_Tp, _Alloc>::push_front(value_type&& __x)
|
|||||||
__node_allocator& __na = base::__node_alloc();
|
__node_allocator& __na = base::__node_alloc();
|
||||||
typedef __allocator_destructor<__node_allocator> _D;
|
typedef __allocator_destructor<__node_allocator> _D;
|
||||||
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
||||||
__node_alloc_traits::construct(__na, addressof(__hold->__value_), _STD::move(__x));
|
__node_alloc_traits::construct(__na, _STD::addressof(__hold->__value_), _STD::move(__x));
|
||||||
__link_nodes(*base::__end_.__next_, *__hold, *__hold);
|
__link_nodes(*base::__end_.__next_, *__hold, *__hold);
|
||||||
++base::__sz();
|
++base::__sz();
|
||||||
__hold.release();
|
__hold.release();
|
||||||
@ -1073,7 +1073,7 @@ list<_Tp, _Alloc>::push_back(value_type&& __x)
|
|||||||
__node_allocator& __na = base::__node_alloc();
|
__node_allocator& __na = base::__node_alloc();
|
||||||
typedef __allocator_destructor<__node_allocator> _D;
|
typedef __allocator_destructor<__node_allocator> _D;
|
||||||
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
||||||
__node_alloc_traits::construct(__na, addressof(__hold->__value_), _STD::move(__x));
|
__node_alloc_traits::construct(__na, _STD::addressof(__hold->__value_), _STD::move(__x));
|
||||||
__link_nodes(static_cast<__node&>(base::__end_), *__hold, *__hold);
|
__link_nodes(static_cast<__node&>(base::__end_), *__hold, *__hold);
|
||||||
++base::__sz();
|
++base::__sz();
|
||||||
__hold.release();
|
__hold.release();
|
||||||
@ -1089,7 +1089,7 @@ list<_Tp, _Alloc>::emplace_front(_Args&&... __args)
|
|||||||
__node_allocator& __na = base::__node_alloc();
|
__node_allocator& __na = base::__node_alloc();
|
||||||
typedef __allocator_destructor<__node_allocator> _D;
|
typedef __allocator_destructor<__node_allocator> _D;
|
||||||
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
||||||
__node_alloc_traits::construct(__na, addressof(__hold->__value_), _STD::forward<_Args>(__args)...);
|
__node_alloc_traits::construct(__na, _STD::addressof(__hold->__value_), _STD::forward<_Args>(__args)...);
|
||||||
__link_nodes(*base::__end_.__next_, *__hold, *__hold);
|
__link_nodes(*base::__end_.__next_, *__hold, *__hold);
|
||||||
++base::__sz();
|
++base::__sz();
|
||||||
__hold.release();
|
__hold.release();
|
||||||
@ -1103,7 +1103,7 @@ list<_Tp, _Alloc>::emplace_back(_Args&&... __args)
|
|||||||
__node_allocator& __na = base::__node_alloc();
|
__node_allocator& __na = base::__node_alloc();
|
||||||
typedef __allocator_destructor<__node_allocator> _D;
|
typedef __allocator_destructor<__node_allocator> _D;
|
||||||
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
||||||
__node_alloc_traits::construct(__na, addressof(__hold->__value_), _STD::forward<_Args>(__args)...);
|
__node_alloc_traits::construct(__na, _STD::addressof(__hold->__value_), _STD::forward<_Args>(__args)...);
|
||||||
__link_nodes(static_cast<__node&>(base::__end_), *__hold, *__hold);
|
__link_nodes(static_cast<__node&>(base::__end_), *__hold, *__hold);
|
||||||
++base::__sz();
|
++base::__sz();
|
||||||
__hold.release();
|
__hold.release();
|
||||||
@ -1118,7 +1118,7 @@ list<_Tp, _Alloc>::emplace(const_iterator __p, _Args&&... __args)
|
|||||||
typedef __allocator_destructor<__node_allocator> _D;
|
typedef __allocator_destructor<__node_allocator> _D;
|
||||||
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
||||||
__hold->__prev_ = 0;
|
__hold->__prev_ = 0;
|
||||||
__node_alloc_traits::construct(__na, addressof(__hold->__value_), _STD::forward<_Args>(__args)...);
|
__node_alloc_traits::construct(__na, _STD::addressof(__hold->__value_), _STD::forward<_Args>(__args)...);
|
||||||
__link_nodes(const_cast<__node&>(*__p.__ptr_), *__hold, *__hold);
|
__link_nodes(const_cast<__node&>(*__p.__ptr_), *__hold, *__hold);
|
||||||
++base::__sz();
|
++base::__sz();
|
||||||
return iterator(__hold.release());
|
return iterator(__hold.release());
|
||||||
@ -1134,7 +1134,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, value_type&& __x)
|
|||||||
typedef __allocator_destructor<__node_allocator> _D;
|
typedef __allocator_destructor<__node_allocator> _D;
|
||||||
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
||||||
__hold->__prev_ = 0;
|
__hold->__prev_ = 0;
|
||||||
__node_alloc_traits::construct(__na, addressof(__hold->__value_), _STD::move(__x));
|
__node_alloc_traits::construct(__na, _STD::addressof(__hold->__value_), _STD::move(__x));
|
||||||
__link_nodes(const_cast<__node&>(*__p.__ptr_), *__hold, *__hold);
|
__link_nodes(const_cast<__node&>(*__p.__ptr_), *__hold, *__hold);
|
||||||
++base::__sz();
|
++base::__sz();
|
||||||
return iterator(__hold.release());
|
return iterator(__hold.release());
|
||||||
@ -1150,8 +1150,8 @@ list<_Tp, _Alloc>::pop_front()
|
|||||||
__node& __n = *base::__end_.__next_;
|
__node& __n = *base::__end_.__next_;
|
||||||
base::__unlink_nodes(__n, __n);
|
base::__unlink_nodes(__n, __n);
|
||||||
--base::__sz();
|
--base::__sz();
|
||||||
__node_alloc_traits::destroy(__na, addressof(__n.__value_));
|
__node_alloc_traits::destroy(__na, _STD::addressof(__n.__value_));
|
||||||
__node_alloc_traits::deallocate(__na, addressof(__n), 1);
|
__node_alloc_traits::deallocate(__na, _STD::addressof(__n), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class _Tp, class _Alloc>
|
template <class _Tp, class _Alloc>
|
||||||
@ -1162,8 +1162,8 @@ list<_Tp, _Alloc>::pop_back()
|
|||||||
__node& __n = *base::__end_.__prev_;
|
__node& __n = *base::__end_.__prev_;
|
||||||
base::__unlink_nodes(__n, __n);
|
base::__unlink_nodes(__n, __n);
|
||||||
--base::__sz();
|
--base::__sz();
|
||||||
__node_alloc_traits::destroy(__na, addressof(__n.__value_));
|
__node_alloc_traits::destroy(__na, _STD::addressof(__n.__value_));
|
||||||
__node_alloc_traits::deallocate(__na, addressof(__n), 1);
|
__node_alloc_traits::deallocate(__na, _STD::addressof(__n), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class _Tp, class _Alloc>
|
template <class _Tp, class _Alloc>
|
||||||
@ -1175,8 +1175,8 @@ list<_Tp, _Alloc>::erase(const_iterator __p)
|
|||||||
__node_pointer __r = __n.__next_;
|
__node_pointer __r = __n.__next_;
|
||||||
base::__unlink_nodes(__n, __n);
|
base::__unlink_nodes(__n, __n);
|
||||||
--base::__sz();
|
--base::__sz();
|
||||||
__node_alloc_traits::destroy(__na, addressof(__n.__value_));
|
__node_alloc_traits::destroy(__na, _STD::addressof(__n.__value_));
|
||||||
__node_alloc_traits::deallocate(__na, addressof(__n), 1);
|
__node_alloc_traits::deallocate(__na, _STD::addressof(__n), 1);
|
||||||
return iterator(__r);
|
return iterator(__r);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1193,8 +1193,8 @@ list<_Tp, _Alloc>::erase(const_iterator __f, const_iterator __l)
|
|||||||
__node& __n = const_cast<__node&>(*__f.__ptr_);
|
__node& __n = const_cast<__node&>(*__f.__ptr_);
|
||||||
++__f;
|
++__f;
|
||||||
--base::__sz();
|
--base::__sz();
|
||||||
__node_alloc_traits::destroy(__na, addressof(__n.__value_));
|
__node_alloc_traits::destroy(__na, _STD::addressof(__n.__value_));
|
||||||
__node_alloc_traits::deallocate(__na, addressof(__n), 1);
|
__node_alloc_traits::deallocate(__na, _STD::addressof(__n), 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return iterator(const_cast<__node_pointer>(__l.__ptr_));
|
return iterator(const_cast<__node_pointer>(__l.__ptr_));
|
||||||
@ -1214,7 +1214,7 @@ list<_Tp, _Alloc>::resize(size_type __n)
|
|||||||
typedef __allocator_destructor<__node_allocator> _D;
|
typedef __allocator_destructor<__node_allocator> _D;
|
||||||
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
||||||
__hold->__prev_ = 0;
|
__hold->__prev_ = 0;
|
||||||
__node_alloc_traits::construct(__na, addressof(__hold->__value_));
|
__node_alloc_traits::construct(__na, _STD::addressof(__hold->__value_));
|
||||||
++__ds;
|
++__ds;
|
||||||
iterator __r = iterator(__hold.release());
|
iterator __r = iterator(__hold.release());
|
||||||
iterator __e = __r;
|
iterator __e = __r;
|
||||||
@ -1225,7 +1225,7 @@ list<_Tp, _Alloc>::resize(size_type __n)
|
|||||||
for (--__n; __n != 0; --__n, ++__e, ++__ds)
|
for (--__n; __n != 0; --__n, ++__e, ++__ds)
|
||||||
{
|
{
|
||||||
__hold.reset(__node_alloc_traits::allocate(__na, 1));
|
__hold.reset(__node_alloc_traits::allocate(__na, 1));
|
||||||
__node_alloc_traits::construct(__na, addressof(__hold->__value_));
|
__node_alloc_traits::construct(__na, _STD::addressof(__hold->__value_));
|
||||||
__e.__ptr_->__next_ = __hold.get();
|
__e.__ptr_->__next_ = __hold.get();
|
||||||
__hold->__prev_ = __e.__ptr_;
|
__hold->__prev_ = __e.__ptr_;
|
||||||
__hold.release();
|
__hold.release();
|
||||||
@ -1236,7 +1236,7 @@ list<_Tp, _Alloc>::resize(size_type __n)
|
|||||||
{
|
{
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
__node_alloc_traits::destroy(__na, addressof(*__e));
|
__node_alloc_traits::destroy(__na, _STD::addressof(*__e));
|
||||||
__node_pointer __prev = __e.__ptr_->__prev_;
|
__node_pointer __prev = __e.__ptr_->__prev_;
|
||||||
__node_alloc_traits::deallocate(__na, __e.__ptr_, 1);
|
__node_alloc_traits::deallocate(__na, __e.__ptr_, 1);
|
||||||
if (__prev == 0)
|
if (__prev == 0)
|
||||||
@ -1265,7 +1265,7 @@ list<_Tp, _Alloc>::resize(size_type __n, const value_type& __x)
|
|||||||
typedef __allocator_destructor<__node_allocator> _D;
|
typedef __allocator_destructor<__node_allocator> _D;
|
||||||
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
unique_ptr<__node, _D> __hold(__node_alloc_traits::allocate(__na, 1), _D(__na, 1));
|
||||||
__hold->__prev_ = 0;
|
__hold->__prev_ = 0;
|
||||||
__node_alloc_traits::construct(__na, addressof(__hold->__value_), __x);
|
__node_alloc_traits::construct(__na, _STD::addressof(__hold->__value_), __x);
|
||||||
++__ds;
|
++__ds;
|
||||||
iterator __r = iterator(__hold.release());
|
iterator __r = iterator(__hold.release());
|
||||||
iterator __e = __r;
|
iterator __e = __r;
|
||||||
@ -1276,7 +1276,7 @@ list<_Tp, _Alloc>::resize(size_type __n, const value_type& __x)
|
|||||||
for (--__n; __n != 0; --__n, ++__e, ++__ds)
|
for (--__n; __n != 0; --__n, ++__e, ++__ds)
|
||||||
{
|
{
|
||||||
__hold.reset(__node_alloc_traits::allocate(__na, 1));
|
__hold.reset(__node_alloc_traits::allocate(__na, 1));
|
||||||
__node_alloc_traits::construct(__na, addressof(__hold->__value_), __x);
|
__node_alloc_traits::construct(__na, _STD::addressof(__hold->__value_), __x);
|
||||||
__e.__ptr_->__next_ = __hold.get();
|
__e.__ptr_->__next_ = __hold.get();
|
||||||
__hold->__prev_ = __e.__ptr_;
|
__hold->__prev_ = __e.__ptr_;
|
||||||
__hold.release();
|
__hold.release();
|
||||||
@ -1287,7 +1287,7 @@ list<_Tp, _Alloc>::resize(size_type __n, const value_type& __x)
|
|||||||
{
|
{
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
__node_alloc_traits::destroy(__na, addressof(*__e));
|
__node_alloc_traits::destroy(__na, _STD::addressof(*__e));
|
||||||
__node_pointer __prev = __e.__ptr_->__prev_;
|
__node_pointer __prev = __e.__ptr_->__prev_;
|
||||||
__node_alloc_traits::deallocate(__na, __e.__ptr_, 1);
|
__node_alloc_traits::deallocate(__na, __e.__ptr_, 1);
|
||||||
if (__prev == 0)
|
if (__prev == 0)
|
||||||
|
28
include/map
28
include/map
@ -475,9 +475,9 @@ public:
|
|||||||
void operator()(pointer __p)
|
void operator()(pointer __p)
|
||||||
{
|
{
|
||||||
if (__second_constructed)
|
if (__second_constructed)
|
||||||
__alloc_traits::destroy(__na_, addressof(__p->__value_.second));
|
__alloc_traits::destroy(__na_, _STD::addressof(__p->__value_.second));
|
||||||
if (__first_constructed)
|
if (__first_constructed)
|
||||||
__alloc_traits::destroy(__na_, addressof(__p->__value_.first));
|
__alloc_traits::destroy(__na_, _STD::addressof(__p->__value_.first));
|
||||||
if (__p)
|
if (__p)
|
||||||
__alloc_traits::deallocate(__na_, __p, 1);
|
__alloc_traits::deallocate(__na_, __p, 1);
|
||||||
}
|
}
|
||||||
@ -1131,9 +1131,9 @@ map<_Key, _Tp, _Compare, _Allocator>::__construct_node()
|
|||||||
{
|
{
|
||||||
__node_allocator& __na = __tree_.__node_alloc();
|
__node_allocator& __na = __tree_.__node_alloc();
|
||||||
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
||||||
__node_traits::construct(__na, addressof(__h->__value_.first));
|
__node_traits::construct(__na, _STD::addressof(__h->__value_.first));
|
||||||
__h.get_deleter().__first_constructed = true;
|
__h.get_deleter().__first_constructed = true;
|
||||||
__node_traits::construct(__na, addressof(__h->__value_.second));
|
__node_traits::construct(__na, _STD::addressof(__h->__value_.second));
|
||||||
__h.get_deleter().__second_constructed = true;
|
__h.get_deleter().__second_constructed = true;
|
||||||
return __h;
|
return __h;
|
||||||
}
|
}
|
||||||
@ -1146,7 +1146,7 @@ map<_Key, _Tp, _Compare, _Allocator>::__construct_node(_A0&& __a0)
|
|||||||
{
|
{
|
||||||
__node_allocator& __na = __tree_.__node_alloc();
|
__node_allocator& __na = __tree_.__node_alloc();
|
||||||
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
||||||
__node_traits::construct(__na, addressof(__h->__value_), _STD::forward<_A0>(__a0));
|
__node_traits::construct(__na, _STD::addressof(__h->__value_), _STD::forward<_A0>(__a0));
|
||||||
__h.get_deleter().__first_constructed = true;
|
__h.get_deleter().__first_constructed = true;
|
||||||
__h.get_deleter().__second_constructed = true;
|
__h.get_deleter().__second_constructed = true;
|
||||||
return __h;
|
return __h;
|
||||||
@ -1162,9 +1162,9 @@ map<_Key, _Tp, _Compare, _Allocator>::__construct_node(_A0&& __a0, _Args&& ...__
|
|||||||
{
|
{
|
||||||
__node_allocator& __na = __tree_.__node_alloc();
|
__node_allocator& __na = __tree_.__node_alloc();
|
||||||
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
||||||
__node_traits::construct(__na, addressof(__h->__value_.first), _STD::forward<_A0>(__a0));
|
__node_traits::construct(__na, _STD::addressof(__h->__value_.first), _STD::forward<_A0>(__a0));
|
||||||
__h.get_deleter().__first_constructed = true;
|
__h.get_deleter().__first_constructed = true;
|
||||||
__node_traits::construct(__na, addressof(__h->__value_.second), _STD::forward<_Args>(__args)...);
|
__node_traits::construct(__na, _STD::addressof(__h->__value_.second), _STD::forward<_Args>(__args)...);
|
||||||
__h.get_deleter().__second_constructed = true;
|
__h.get_deleter().__second_constructed = true;
|
||||||
return __h;
|
return __h;
|
||||||
}
|
}
|
||||||
@ -1179,9 +1179,9 @@ map<_Key, _Tp, _Compare, _Allocator>::__construct_node(const key_type& __k)
|
|||||||
{
|
{
|
||||||
__node_allocator& __na = __tree_.__node_alloc();
|
__node_allocator& __na = __tree_.__node_alloc();
|
||||||
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
||||||
__node_traits::construct(__na, addressof(__h->__value_.first), __k);
|
__node_traits::construct(__na, _STD::addressof(__h->__value_.first), __k);
|
||||||
__h.get_deleter().__first_constructed = true;
|
__h.get_deleter().__first_constructed = true;
|
||||||
__node_traits::construct(__na, addressof(__h->__value_.second));
|
__node_traits::construct(__na, _STD::addressof(__h->__value_.second));
|
||||||
__h.get_deleter().__second_constructed = true;
|
__h.get_deleter().__second_constructed = true;
|
||||||
return _STD::move(__h);
|
return _STD::move(__h);
|
||||||
}
|
}
|
||||||
@ -1685,9 +1685,9 @@ multimap<_Key, _Tp, _Compare, _Allocator>::__construct_node()
|
|||||||
{
|
{
|
||||||
__node_allocator& __na = __tree_.__node_alloc();
|
__node_allocator& __na = __tree_.__node_alloc();
|
||||||
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
||||||
__node_traits::construct(__na, addressof(__h->__value_.first));
|
__node_traits::construct(__na, _STD::addressof(__h->__value_.first));
|
||||||
__h.get_deleter().__first_constructed = true;
|
__h.get_deleter().__first_constructed = true;
|
||||||
__node_traits::construct(__na, addressof(__h->__value_.second));
|
__node_traits::construct(__na, _STD::addressof(__h->__value_.second));
|
||||||
__h.get_deleter().__second_constructed = true;
|
__h.get_deleter().__second_constructed = true;
|
||||||
return __h;
|
return __h;
|
||||||
}
|
}
|
||||||
@ -1701,7 +1701,7 @@ multimap<_Key, _Tp, _Compare, _Allocator>::__construct_node(_A0&& __a0)
|
|||||||
{
|
{
|
||||||
__node_allocator& __na = __tree_.__node_alloc();
|
__node_allocator& __na = __tree_.__node_alloc();
|
||||||
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
||||||
__node_traits::construct(__na, addressof(__h->__value_), _STD::forward<_A0>(__a0));
|
__node_traits::construct(__na, _STD::addressof(__h->__value_), _STD::forward<_A0>(__a0));
|
||||||
__h.get_deleter().__first_constructed = true;
|
__h.get_deleter().__first_constructed = true;
|
||||||
__h.get_deleter().__second_constructed = true;
|
__h.get_deleter().__second_constructed = true;
|
||||||
return __h;
|
return __h;
|
||||||
@ -1718,9 +1718,9 @@ multimap<_Key, _Tp, _Compare, _Allocator>::__construct_node(_A0&& __a0, _Args&&
|
|||||||
{
|
{
|
||||||
__node_allocator& __na = __tree_.__node_alloc();
|
__node_allocator& __na = __tree_.__node_alloc();
|
||||||
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
||||||
__node_traits::construct(__na, addressof(__h->__value_.first), _STD::forward<_A0>(__a0));
|
__node_traits::construct(__na, _STD::addressof(__h->__value_.first), _STD::forward<_A0>(__a0));
|
||||||
__h.get_deleter().__first_constructed = true;
|
__h.get_deleter().__first_constructed = true;
|
||||||
__node_traits::construct(__na, addressof(__h->__value_.second), _STD::forward<_Args>(__args)...);
|
__node_traits::construct(__na, _STD::addressof(__h->__value_.second), _STD::forward<_Args>(__args)...);
|
||||||
__h.get_deleter().__second_constructed = true;
|
__h.get_deleter().__second_constructed = true;
|
||||||
return __h;
|
return __h;
|
||||||
}
|
}
|
||||||
|
@ -1525,8 +1525,8 @@ public:
|
|||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY allocator() throw() {}
|
_LIBCPP_INLINE_VISIBILITY allocator() throw() {}
|
||||||
template <class _Up> _LIBCPP_INLINE_VISIBILITY allocator(const allocator<_Up>&) throw() {}
|
template <class _Up> _LIBCPP_INLINE_VISIBILITY allocator(const allocator<_Up>&) throw() {}
|
||||||
_LIBCPP_INLINE_VISIBILITY pointer address(reference __x) const {return addressof(__x);}
|
_LIBCPP_INLINE_VISIBILITY pointer address(reference __x) const {return _STD::addressof(__x);}
|
||||||
_LIBCPP_INLINE_VISIBILITY const_pointer address(const_reference __x) const {return addressof(__x);}
|
_LIBCPP_INLINE_VISIBILITY const_pointer address(const_reference __x) const {return _STD::addressof(__x);}
|
||||||
_LIBCPP_INLINE_VISIBILITY pointer allocate(size_type __n, allocator<void>::const_pointer = 0)
|
_LIBCPP_INLINE_VISIBILITY pointer allocate(size_type __n, allocator<void>::const_pointer = 0)
|
||||||
{return static_cast<pointer>(::operator new(__n * sizeof(_Tp)));}
|
{return static_cast<pointer>(::operator new(__n * sizeof(_Tp)));}
|
||||||
_LIBCPP_INLINE_VISIBILITY void deallocate(pointer __p, size_type) {::operator delete((void*)__p);}
|
_LIBCPP_INLINE_VISIBILITY void deallocate(pointer __p, size_type) {::operator delete((void*)__p);}
|
||||||
|
@ -424,9 +424,9 @@ public:
|
|||||||
void operator()(pointer __p)
|
void operator()(pointer __p)
|
||||||
{
|
{
|
||||||
if (__second_constructed)
|
if (__second_constructed)
|
||||||
__alloc_traits::destroy(__na_, addressof(__p->__value_.second));
|
__alloc_traits::destroy(__na_, _STD::addressof(__p->__value_.second));
|
||||||
if (__first_constructed)
|
if (__first_constructed)
|
||||||
__alloc_traits::destroy(__na_, addressof(__p->__value_.first));
|
__alloc_traits::destroy(__na_, _STD::addressof(__p->__value_.first));
|
||||||
if (__p)
|
if (__p)
|
||||||
__alloc_traits::deallocate(__na_, __p, 1);
|
__alloc_traits::deallocate(__na_, __p, 1);
|
||||||
}
|
}
|
||||||
@ -979,10 +979,10 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node(_A0&& __a0,
|
|||||||
{
|
{
|
||||||
__node_allocator& __na = __table_.__node_alloc();
|
__node_allocator& __na = __table_.__node_alloc();
|
||||||
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
||||||
__node_traits::construct(__na, addressof(__h->__value_.first),
|
__node_traits::construct(__na, _STD::addressof(__h->__value_.first),
|
||||||
_STD::forward<_A0>(__a0));
|
_STD::forward<_A0>(__a0));
|
||||||
__h.get_deleter().__first_constructed = true;
|
__h.get_deleter().__first_constructed = true;
|
||||||
__node_traits::construct(__na, addressof(__h->__value_.second),
|
__node_traits::construct(__na, _STD::addressof(__h->__value_.second),
|
||||||
_STD::forward<_Args>(__args)...);
|
_STD::forward<_Args>(__args)...);
|
||||||
__h.get_deleter().__second_constructed = true;
|
__h.get_deleter().__second_constructed = true;
|
||||||
return __h;
|
return __h;
|
||||||
@ -999,7 +999,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node(_A0&& __a0)
|
|||||||
{
|
{
|
||||||
__node_allocator& __na = __table_.__node_alloc();
|
__node_allocator& __na = __table_.__node_alloc();
|
||||||
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
||||||
__node_traits::construct(__na, addressof(__h->__value_),
|
__node_traits::construct(__na, _STD::addressof(__h->__value_),
|
||||||
_STD::forward<_A0>(__a0));
|
_STD::forward<_A0>(__a0));
|
||||||
__h.get_deleter().__first_constructed = true;
|
__h.get_deleter().__first_constructed = true;
|
||||||
__h.get_deleter().__second_constructed = true;
|
__h.get_deleter().__second_constructed = true;
|
||||||
@ -1032,9 +1032,9 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node(const key_type&
|
|||||||
{
|
{
|
||||||
__node_allocator& __na = __table_.__node_alloc();
|
__node_allocator& __na = __table_.__node_alloc();
|
||||||
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
||||||
__node_traits::construct(__na, addressof(__h->__value_.first), __k);
|
__node_traits::construct(__na, _STD::addressof(__h->__value_.first), __k);
|
||||||
__h.get_deleter().__first_constructed = true;
|
__h.get_deleter().__first_constructed = true;
|
||||||
__node_traits::construct(__na, addressof(__h->__value_.second));
|
__node_traits::construct(__na, _STD::addressof(__h->__value_.second));
|
||||||
__h.get_deleter().__second_constructed = true;
|
__h.get_deleter().__second_constructed = true;
|
||||||
return _STD::move(__h);
|
return _STD::move(__h);
|
||||||
}
|
}
|
||||||
@ -1560,10 +1560,10 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node(
|
|||||||
{
|
{
|
||||||
__node_allocator& __na = __table_.__node_alloc();
|
__node_allocator& __na = __table_.__node_alloc();
|
||||||
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
||||||
__node_traits::construct(__na, addressof(__h->__value_.first),
|
__node_traits::construct(__na, _STD::addressof(__h->__value_.first),
|
||||||
_STD::forward<_A0>(__a0));
|
_STD::forward<_A0>(__a0));
|
||||||
__h.get_deleter().__first_constructed = true;
|
__h.get_deleter().__first_constructed = true;
|
||||||
__node_traits::construct(__na, addressof(__h->__value_.second),
|
__node_traits::construct(__na, _STD::addressof(__h->__value_.second),
|
||||||
_STD::forward<_Args>(__args)...);
|
_STD::forward<_Args>(__args)...);
|
||||||
__h.get_deleter().__second_constructed = true;
|
__h.get_deleter().__second_constructed = true;
|
||||||
return __h;
|
return __h;
|
||||||
@ -1580,7 +1580,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node(_A0&& __a0
|
|||||||
{
|
{
|
||||||
__node_allocator& __na = __table_.__node_alloc();
|
__node_allocator& __na = __table_.__node_alloc();
|
||||||
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
__node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
|
||||||
__node_traits::construct(__na, addressof(__h->__value_),
|
__node_traits::construct(__na, _STD::addressof(__h->__value_),
|
||||||
_STD::forward<_A0>(__a0));
|
_STD::forward<_A0>(__a0));
|
||||||
__h.get_deleter().__first_constructed = true;
|
__h.get_deleter().__first_constructed = true;
|
||||||
__h.get_deleter().__second_constructed = true;
|
__h.get_deleter().__second_constructed = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user