summaryrefslogtreecommitdiffstats
path: root/libcxx/include/__split_buffer
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2019-11-16 17:13:26 -0500
committerEric Fiselier <eric@efcs.ca>2019-11-16 17:16:09 -0500
commit0068c5913999b14627c27433c8d846a2ef5fbe00 (patch)
tree1ca9de27cd7097660bd6083bbdc75a493819ab07 /libcxx/include/__split_buffer
parent2916489c54a303971bc546f287b71532d49ddd33 (diff)
downloadbcm5719-llvm-0068c5913999b14627c27433c8d846a2ef5fbe00.tar.gz
bcm5719-llvm-0068c5913999b14627c27433c8d846a2ef5fbe00.zip
[libc++] Rename __to_raw_pointer to __to_address.
This function has the same behavior as the now-standand std::to_address. Re-using the name makes the behavior more clear, and in the future it will allow us to correctly get the raw pointer for user provided pointer types.
Diffstat (limited to 'libcxx/include/__split_buffer')
-rw-r--r--libcxx/include/__split_buffer24
1 files changed, 12 insertions, 12 deletions
diff --git a/libcxx/include/__split_buffer b/libcxx/include/__split_buffer
index 095fe8928c6..f221aee074f 100644
--- a/libcxx/include/__split_buffer
+++ b/libcxx/include/__split_buffer
@@ -212,7 +212,7 @@ __split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n)
{
_ConstructTransaction __tx(&this->__end_, __n);
for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) {
- __alloc_traits::construct(this->__alloc(), _VSTD::__to_raw_pointer(__tx.__pos_));
+ __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__tx.__pos_));
}
}
@@ -229,7 +229,7 @@ __split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n, const_referen
_ConstructTransaction __tx(&this->__end_, __n);
for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) {
__alloc_traits::construct(this->__alloc(),
- _VSTD::__to_raw_pointer(__tx.__pos_), __x);
+ _VSTD::__to_address(__tx.__pos_), __x);
}
}
@@ -253,10 +253,10 @@ __split_buffer<_Tp, _Allocator>::__construct_at_end(_InputIter __first, _InputIt
__split_buffer __buf(__new_cap, 0, __a);
for (pointer __p = __begin_; __p != __end_; ++__p, ++__buf.__end_)
__alloc_traits::construct(__buf.__alloc(),
- _VSTD::__to_raw_pointer(__buf.__end_), _VSTD::move(*__p));
+ _VSTD::__to_address(__buf.__end_), _VSTD::move(*__p));
swap(__buf);
}
- __alloc_traits::construct(__a, _VSTD::__to_raw_pointer(this->__end_), *__first);
+ __alloc_traits::construct(__a, _VSTD::__to_address(this->__end_), *__first);
++this->__end_;
}
}
@@ -273,7 +273,7 @@ __split_buffer<_Tp, _Allocator>::__construct_at_end(_ForwardIterator __first, _F
_ConstructTransaction __tx(&this->__end_, std::distance(__first, __last));
for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_, ++__first) {
__alloc_traits::construct(this->__alloc(),
- _VSTD::__to_raw_pointer(__tx.__pos_), *__first);
+ _VSTD::__to_address(__tx.__pos_), *__first);
}
}
@@ -283,7 +283,7 @@ void
__split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, false_type)
{
while (__begin_ != __new_begin)
- __alloc_traits::destroy(__alloc(), __to_raw_pointer(__begin_++));
+ __alloc_traits::destroy(__alloc(), __to_address(__begin_++));
}
template <class _Tp, class _Allocator>
@@ -300,7 +300,7 @@ void
__split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, false_type) _NOEXCEPT
{
while (__new_last != __end_)
- __alloc_traits::destroy(__alloc(), __to_raw_pointer(--__end_));
+ __alloc_traits::destroy(__alloc(), __to_address(--__end_));
}
template <class _Tp, class _Allocator>
@@ -495,7 +495,7 @@ __split_buffer<_Tp, _Allocator>::push_front(const_reference __x)
_VSTD::swap(__end_cap(), __t.__end_cap());
}
}
- __alloc_traits::construct(__alloc(), _VSTD::__to_raw_pointer(__begin_-1), __x);
+ __alloc_traits::construct(__alloc(), _VSTD::__to_address(__begin_-1), __x);
--__begin_;
}
@@ -526,7 +526,7 @@ __split_buffer<_Tp, _Allocator>::push_front(value_type&& __x)
_VSTD::swap(__end_cap(), __t.__end_cap());
}
}
- __alloc_traits::construct(__alloc(), _VSTD::__to_raw_pointer(__begin_-1),
+ __alloc_traits::construct(__alloc(), _VSTD::__to_address(__begin_-1),
_VSTD::move(__x));
--__begin_;
}
@@ -559,7 +559,7 @@ __split_buffer<_Tp, _Allocator>::push_back(const_reference __x)
_VSTD::swap(__end_cap(), __t.__end_cap());
}
}
- __alloc_traits::construct(__alloc(), _VSTD::__to_raw_pointer(__end_), __x);
+ __alloc_traits::construct(__alloc(), _VSTD::__to_address(__end_), __x);
++__end_;
}
@@ -590,7 +590,7 @@ __split_buffer<_Tp, _Allocator>::push_back(value_type&& __x)
_VSTD::swap(__end_cap(), __t.__end_cap());
}
}
- __alloc_traits::construct(__alloc(), _VSTD::__to_raw_pointer(__end_),
+ __alloc_traits::construct(__alloc(), _VSTD::__to_address(__end_),
_VSTD::move(__x));
++__end_;
}
@@ -621,7 +621,7 @@ __split_buffer<_Tp, _Allocator>::emplace_back(_Args&&... __args)
_VSTD::swap(__end_cap(), __t.__end_cap());
}
}
- __alloc_traits::construct(__alloc(), _VSTD::__to_raw_pointer(__end_),
+ __alloc_traits::construct(__alloc(), _VSTD::__to_address(__end_),
_VSTD::forward<_Args>(__args)...);
++__end_;
}
OpenPOWER on IntegriCloud