summaryrefslogtreecommitdiffstats
path: root/libcxx/include/__split_buffer
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2013-06-23 21:17:24 +0000
committerHoward Hinnant <hhinnant@apple.com>2013-06-23 21:17:24 +0000
commit14e200d14d02fd36fd1ff1fd02b9b150ce170db8 (patch)
tree064e9770be840f37d5bc39b5a51a16cb0fbd3d90 /libcxx/include/__split_buffer
parent60c16eb7f537dcabce2aa9c0f3305d7f44287cf5 (diff)
downloadbcm5719-llvm-14e200d14d02fd36fd1ff1fd02b9b150ce170db8.tar.gz
bcm5719-llvm-14e200d14d02fd36fd1ff1fd02b9b150ce170db8.zip
Implement full support for non-pointer pointers in custom allocators for deque.
llvm-svn: 184673
Diffstat (limited to 'libcxx/include/__split_buffer')
-rw-r--r--libcxx/include/__split_buffer12
1 files changed, 6 insertions, 6 deletions
diff --git a/libcxx/include/__split_buffer b/libcxx/include/__split_buffer
index e0aa13b8988..f1c404f7741 100644
--- a/libcxx/include/__split_buffer
+++ b/libcxx/include/__split_buffer
@@ -290,7 +290,7 @@ void
__split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, false_type)
{
while (__begin_ != __new_begin)
- __alloc_traits::destroy(__alloc(), __begin_++);
+ __alloc_traits::destroy(__alloc(), __to_raw_pointer(__begin_++));
}
template <class _Tp, class _Allocator>
@@ -307,7 +307,7 @@ void
__split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, false_type) _NOEXCEPT
{
while (__new_last != __end_)
- __alloc_traits::destroy(__alloc(), --__end_);
+ __alloc_traits::destroy(__alloc(), __to_raw_pointer(--__end_));
}
template <class _Tp, class _Allocator>
@@ -320,7 +320,7 @@ __split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, true_type
template <class _Tp, class _Allocator>
__split_buffer<_Tp, _Allocator>::__split_buffer(size_type __cap, size_type __start, __alloc_rr& __a)
- : __end_cap_(0, __a)
+ : __end_cap_(nullptr, __a)
{
__first_ = __cap != 0 ? __alloc_traits::allocate(__alloc(), __cap) : nullptr;
__begin_ = __end_ = __first_ + __start;
@@ -331,21 +331,21 @@ template <class _Tp, class _Allocator>
_LIBCPP_INLINE_VISIBILITY inline
__split_buffer<_Tp, _Allocator>::__split_buffer()
_NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
- : __first_(0), __begin_(0), __end_(0), __end_cap_(0)
+ : __first_(nullptr), __begin_(nullptr), __end_(nullptr), __end_cap_(nullptr)
{
}
template <class _Tp, class _Allocator>
_LIBCPP_INLINE_VISIBILITY inline
__split_buffer<_Tp, _Allocator>::__split_buffer(__alloc_rr& __a)
- : __first_(0), __begin_(0), __end_(0), __end_cap_(0, __a)
+ : __first_(nullptr), __begin_(nullptr), __end_(nullptr), __end_cap_(nullptr, __a)
{
}
template <class _Tp, class _Allocator>
_LIBCPP_INLINE_VISIBILITY inline
__split_buffer<_Tp, _Allocator>::__split_buffer(const __alloc_rr& __a)
- : __first_(0), __begin_(0), __end_(0), __end_cap_(0, __a)
+ : __first_(nullptr), __begin_(nullptr), __end_(nullptr), __end_cap_(nullptr, __a)
{
}
OpenPOWER on IntegriCloud