diff options
Diffstat (limited to 'boost/beast/core/impl/multi_buffer.ipp')
-rw-r--r-- | boost/beast/core/impl/multi_buffer.ipp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/boost/beast/core/impl/multi_buffer.ipp b/boost/beast/core/impl/multi_buffer.ipp index 0b35decd05..fb48424a3a 100644 --- a/boost/beast/core/impl/multi_buffer.ipp +++ b/boost/beast/core/impl/multi_buffer.ipp @@ -440,8 +440,8 @@ basic_multi_buffer(std::size_t limit) template<class Allocator> basic_multi_buffer<Allocator>:: basic_multi_buffer(Allocator const& alloc) - : detail::empty_base_optimization< - base_alloc_type>(alloc) + : boost::empty_value< + base_alloc_type>(boost::empty_init_t(), alloc) , out_(list_.end()) { } @@ -450,8 +450,8 @@ template<class Allocator> basic_multi_buffer<Allocator>:: basic_multi_buffer(std::size_t limit, Allocator const& alloc) - : detail::empty_base_optimization< - base_alloc_type>(alloc) + : boost::empty_value< + base_alloc_type>(boost::empty_init_t(), alloc) , max_(limit) , out_(list_.end()) { @@ -460,8 +460,8 @@ basic_multi_buffer(std::size_t limit, template<class Allocator> basic_multi_buffer<Allocator>:: basic_multi_buffer(basic_multi_buffer&& other) - : detail::empty_base_optimization< - base_alloc_type>(std::move(other.member())) + : boost::empty_value< + base_alloc_type>(boost::empty_init_t(), std::move(other.get())) , max_(other.max_) , in_size_(boost::exchange(other.in_size_, 0)) , in_pos_(boost::exchange(other.in_pos_, 0)) @@ -479,11 +479,11 @@ template<class Allocator> basic_multi_buffer<Allocator>:: basic_multi_buffer(basic_multi_buffer&& other, Allocator const& alloc) - : detail::empty_base_optimization< - base_alloc_type>(alloc) + : boost::empty_value< + base_alloc_type>(boost::empty_init_t(), alloc) , max_(other.max_) { - if(this->member() != other.member()) + if(this->get() != other.get()) { out_ = list_.end(); copy_from(other); @@ -510,10 +510,10 @@ basic_multi_buffer(basic_multi_buffer&& other, template<class Allocator> basic_multi_buffer<Allocator>:: basic_multi_buffer(basic_multi_buffer const& other) - : detail::empty_base_optimization< - base_alloc_type>(alloc_traits:: + : boost::empty_value< + base_alloc_type>(boost::empty_init_t(), alloc_traits:: select_on_container_copy_construction( - other.member())) + other.get())) , max_(other.max_) , out_(list_.end()) { @@ -524,8 +524,8 @@ template<class Allocator> basic_multi_buffer<Allocator>:: basic_multi_buffer(basic_multi_buffer const& other, Allocator const& alloc) - : detail::empty_base_optimization< - base_alloc_type>(alloc) + : boost::empty_value< + base_alloc_type>(boost::empty_init_t(), alloc) , max_(other.max_) , out_(list_.end()) { @@ -548,8 +548,8 @@ basic_multi_buffer<Allocator>:: basic_multi_buffer( basic_multi_buffer<OtherAlloc> const& other, allocator_type const& alloc) - : detail::empty_base_optimization< - base_alloc_type>(alloc) + : boost::empty_value< + base_alloc_type>(boost::empty_init_t(), alloc) , max_(other.max_) , out_(list_.end()) { @@ -689,8 +689,8 @@ prepare(size_type n) -> auto& e = *it++; reuse.erase(list_.iterator_to(e)); auto const len = sizeof(e) + e.size(); - alloc_traits::destroy(this->member(), &e); - alloc_traits::deallocate(this->member(), + alloc_traits::destroy(this->get(), &e); + alloc_traits::deallocate(this->get(), reinterpret_cast<char*>(&e), len); } if(n > 0) @@ -705,9 +705,9 @@ prepare(size_type n) -> 512, n})); auto& e = *reinterpret_cast<element*>(static_cast< - void*>(alloc_traits::allocate(this->member(), + void*>(alloc_traits::allocate(this->get(), sizeof(element) + size))); - alloc_traits::construct(this->member(), &e, size); + alloc_traits::construct(this->get(), &e, size); list_.push_back(e); if(out_ == list_.end()) out_ = list_.iterator_to(e); @@ -795,8 +795,8 @@ consume(size_type n) auto& e = list_.front(); list_.erase(list_.iterator_to(e)); auto const len = sizeof(e) + e.size(); - alloc_traits::destroy(this->member(), &e); - alloc_traits::deallocate(this->member(), + alloc_traits::destroy(this->get(), &e); + alloc_traits::deallocate(this->get(), reinterpret_cast<char*>(&e), len); #if BOOST_BEAST_MULTI_BUFFER_DEBUG_CHECK debug_check(); @@ -845,8 +845,8 @@ delete_list() { auto& e = *iter++; auto const len = sizeof(e) + e.size(); - alloc_traits::destroy(this->member(), &e); - alloc_traits::deallocate(this->member(), + alloc_traits::destroy(this->get(), &e); + alloc_traits::deallocate(this->get(), reinterpret_cast<char*>(&e), len); } } @@ -886,7 +886,7 @@ void basic_multi_buffer<Allocator>:: move_assign(basic_multi_buffer& other, std::false_type) { - if(this->member() != other.member()) + if(this->get() != other.get()) { copy_from(other); other.reset(); @@ -903,7 +903,7 @@ void basic_multi_buffer<Allocator>:: move_assign(basic_multi_buffer& other, std::true_type) { - this->member() = std::move(other.member()); + this->get() = std::move(other.get()); auto const at_end = other.out_ == other.list_.end(); list_ = std::move(other.list_); @@ -942,7 +942,7 @@ copy_assign( { reset(); max_ = other.max_; - this->member() = other.member(); + this->get() = other.get(); copy_from(other); } @@ -967,7 +967,7 @@ swap(basic_multi_buffer& other, std::true_type) out_ == list_.end(); auto const at_end1 = other.out_ == other.list_.end(); - swap(this->member(), other.member()); + swap(this->get(), other.get()); swap(list_, other.list_); swap(out_, other.out_); if(at_end1) @@ -986,7 +986,7 @@ void basic_multi_buffer<Allocator>:: swap(basic_multi_buffer& other, std::false_type) { - BOOST_ASSERT(this->member() == other.member()); + BOOST_ASSERT(this->get() == other.get()); using std::swap; auto const at_end0 = out_ == list_.end(); |