summaryrefslogtreecommitdiff
path: root/libcxx/include/__split_buffer
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/__split_buffer')
-rw-r--r--libcxx/include/__split_buffer40
1 files changed, 20 insertions, 20 deletions
diff --git a/libcxx/include/__split_buffer b/libcxx/include/__split_buffer
index 095fe8928c6d..fce209f8287e 100644
--- a/libcxx/include/__split_buffer
+++ b/libcxx/include/__split_buffer
@@ -116,15 +116,15 @@ public:
template <class _InputIter>
typename enable_if
<
- __is_input_iterator<_InputIter>::value &&
- !__is_forward_iterator<_InputIter>::value,
+ __is_cpp17_input_iterator<_InputIter>::value &&
+ !__is_cpp17_forward_iterator<_InputIter>::value,
void
>::type
__construct_at_end(_InputIter __first, _InputIter __last);
template <class _ForwardIterator>
typename enable_if
<
- __is_forward_iterator<_ForwardIterator>::value,
+ __is_cpp17_forward_iterator<_ForwardIterator>::value,
void
>::type
__construct_at_end(_ForwardIterator __first, _ForwardIterator __last);
@@ -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);
}
}
@@ -237,8 +237,8 @@ template <class _Tp, class _Allocator>
template <class _InputIter>
typename enable_if
<
- __is_input_iterator<_InputIter>::value &&
- !__is_forward_iterator<_InputIter>::value,
+ __is_cpp17_input_iterator<_InputIter>::value &&
+ !__is_cpp17_forward_iterator<_InputIter>::value,
void
>::type
__split_buffer<_Tp, _Allocator>::__construct_at_end(_InputIter __first, _InputIter __last)
@@ -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_;
}
}
@@ -265,7 +265,7 @@ template <class _Tp, class _Allocator>
template <class _ForwardIterator>
typename enable_if
<
- __is_forward_iterator<_ForwardIterator>::value,
+ __is_cpp17_forward_iterator<_ForwardIterator>::value,
void
>::type
__split_buffer<_Tp, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardIterator __last)
@@ -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>
@@ -324,7 +324,7 @@ template <class _Tp, class _Allocator>
inline
__split_buffer<_Tp, _Allocator>::__split_buffer()
_NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
- : __first_(nullptr), __begin_(nullptr), __end_(nullptr), __end_cap_(nullptr)
+ : __first_(nullptr), __begin_(nullptr), __end_(nullptr), __end_cap_(nullptr, __default_init_tag())
{
}
@@ -368,7 +368,7 @@ __split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c)
template <class _Tp, class _Allocator>
__split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c, const __alloc_rr& __a)
- : __end_cap_(__second_tag(), __a)
+ : __end_cap_(nullptr, __a)
{
if (__a == __c.__alloc())
{
@@ -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_;
}