struct deque_value_traits
{
typedef T value_type;
- static const bool trivial_dctr = container_detail::is_trivially_destructible<value_type>::value;
+ static const bool trivial_dctr = dtl::is_trivially_destructible<value_type>::value;
static const bool trivial_dctr_after_move = ::boost::has_trivial_destructor_after_move<value_type>::value;
};
static const std::size_t value = sizeof_t < min_size ? (min_size/sizeof_t) : std::size_t(1);
};
-namespace container_detail {
+namespace dtl {
// Class invariants:
// For any nonsingular iterator i:
{ return x += n; }
};
-} //namespace container_detail {
+} //namespace dtl {
// Deque base class. It has two purposes. First, its constructor
// and destructor allocate (but don't initialize) storage. This makes
void priv_deallocate_map(ptr_alloc_ptr p, size_type n) BOOST_NOEXCEPT_OR_NOTHROW
{ this->ptr_alloc().deallocate(p, n); }
- typedef container_detail::deque_iterator<val_alloc_ptr, false> iterator;
- typedef container_detail::deque_iterator<val_alloc_ptr, true > const_iterator;
+ typedef dtl::deque_iterator<val_alloc_ptr, false> iterator;
+ typedef dtl::deque_iterator<val_alloc_ptr, true > const_iterator;
deque_base(size_type num_elements, const allocator_type& a)
: members_(a)
// if(num_elements){
size_type num_nodes = num_elements / s_buffer_size() + 1;
- this->members_.m_map_size = container_detail::max_value((size_type) InitialMapSize, num_nodes + 2);
+ this->members_.m_map_size = dtl::max_value((size_type) InitialMapSize, num_nodes + 2);
this->members_.m_map = this->priv_allocate_map(this->members_.m_map_size);
ptr_alloc_ptr nstart = this->members_.m_map + (this->members_.m_map_size - num_nodes) / 2;
//! <b>Throws</b>: If allocator_type's default constructor throws.
//!
//! <b>Complexity</b>: Constant.
- deque() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value)
+ deque() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value)
: Base()
{}
explicit deque(size_type n)
: Base(n, allocator_type())
{
- container_detail::insert_value_initialized_n_proxy<Allocator, iterator> proxy;
+ dtl::insert_value_initialized_n_proxy<Allocator, iterator> proxy;
proxy.uninitialized_copy_n_and_update(this->alloc(), this->begin(), n);
//deque_base will deallocate in case of exception...
}
deque(size_type n, default_init_t)
: Base(n, allocator_type())
{
- container_detail::insert_default_initialized_n_proxy<Allocator, iterator> proxy;
+ dtl::insert_default_initialized_n_proxy<Allocator, iterator> proxy;
proxy.uninitialized_copy_n_and_update(this->alloc(), this->begin(), n);
//deque_base will deallocate in case of exception...
}
explicit deque(size_type n, const allocator_type &a)
: Base(n, a)
{
- container_detail::insert_value_initialized_n_proxy<Allocator, iterator> proxy;
+ dtl::insert_value_initialized_n_proxy<Allocator, iterator> proxy;
proxy.uninitialized_copy_n_and_update(this->alloc(), this->begin(), n);
//deque_base will deallocate in case of exception...
}
deque(size_type n, default_init_t, const allocator_type &a)
: Base(n, a)
{
- container_detail::insert_default_initialized_n_proxy<Allocator, iterator> proxy;
+ dtl::insert_default_initialized_n_proxy<Allocator, iterator> proxy;
proxy.uninitialized_copy_n_and_update(this->alloc(), this->begin(), n);
//deque_base will deallocate in case of exception...
}
template <class InIt>
deque(InIt first, InIt last
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- , typename container_detail::disable_if_convertible
+ , typename dtl::disable_if_convertible
<InIt, size_type>::type * = 0
#endif
)
template <class InIt>
deque(InIt first, InIt last, const allocator_type& a
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- , typename container_detail::disable_if_convertible
+ , typename dtl::disable_if_convertible
<InIt, size_type>::type * = 0
#endif
)
if (&x != this){
allocator_type &this_alloc = this->alloc();
const allocator_type &x_alloc = x.alloc();
- container_detail::bool_<allocator_traits_type::
+ dtl::bool_<allocator_traits_type::
propagate_on_container_copy_assignment::value> flag;
if(flag && this_alloc != x_alloc){
this->clear();
this->shrink_to_fit();
}
- container_detail::assign_alloc(this->alloc(), x.alloc(), flag);
- container_detail::assign_alloc(this->ptr_alloc(), x.ptr_alloc(), flag);
+ dtl::assign_alloc(this->alloc(), x.alloc(), flag);
+ dtl::assign_alloc(this->ptr_alloc(), x.ptr_alloc(), flag);
this->assign(x.cbegin(), x.cend());
}
return *this;
allocator_type &x_alloc = x.alloc();
const bool propagate_alloc = allocator_traits_type::
propagate_on_container_move_assignment::value;
- container_detail::bool_<propagate_alloc> flag;
+ dtl::bool_<propagate_alloc> flag;
const bool allocators_equal = this_alloc == x_alloc; (void)allocators_equal;
//Resources can be transferred if both allocators are
//going to be equal after this function (either propagated or already equal)
//Destroy objects but retain memory in case x reuses it in the future
this->clear();
//Move allocator if needed
- container_detail::move_alloc(this_alloc, x_alloc, flag);
- container_detail::move_alloc(this->ptr_alloc(), x.ptr_alloc(), flag);
+ dtl::move_alloc(this_alloc, x_alloc, flag);
+ dtl::move_alloc(this->ptr_alloc(), x.ptr_alloc(), flag);
//Nothrow swap
this->swap_members(x);
}
template <class InIt>
void assign(InIt first, InIt last
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- , typename container_detail::disable_if_or
+ , typename dtl::disable_if_or
< void
- , container_detail::is_convertible<InIt, size_type>
- , container_detail::is_not_input_iterator<InIt>
+ , dtl::is_convertible<InIt, size_type>
+ , dtl::is_not_input_iterator<InIt>
>::type * = 0
#endif
)
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
template <class FwdIt>
void assign(FwdIt first, FwdIt last
- , typename container_detail::disable_if_or
+ , typename dtl::disable_if_or
< void
- , container_detail::is_convertible<FwdIt, size_type>
- , container_detail::is_input_iterator<FwdIt>
+ , dtl::is_convertible<FwdIt, size_type>
+ , dtl::is_input_iterator<FwdIt>
>::type * = 0
)
{
this->priv_erase_last_n(len - new_size);
else{
const size_type n = new_size - this->size();
- container_detail::insert_value_initialized_n_proxy<Allocator, iterator> proxy;
+ dtl::insert_value_initialized_n_proxy<Allocator, iterator> proxy;
priv_insert_back_aux_impl(n, proxy);
}
}
this->priv_erase_last_n(len - new_size);
else{
const size_type n = new_size - this->size();
- container_detail::insert_default_initialized_n_proxy<Allocator, iterator> proxy;
+ dtl::insert_default_initialized_n_proxy<Allocator, iterator> proxy;
priv_insert_back_aux_impl(n, proxy);
}
}
return r;
}
else{
- typedef container_detail::insert_nonmovable_emplace_proxy<Allocator, iterator, Args...> type;
+ typedef dtl::insert_nonmovable_emplace_proxy<Allocator, iterator, Args...> type;
return *this->priv_insert_front_aux_impl(1, type(boost::forward<Args>(args)...));
}
}
return r;
}
else{
- typedef container_detail::insert_nonmovable_emplace_proxy<Allocator, iterator, Args...> type;
+ typedef dtl::insert_nonmovable_emplace_proxy<Allocator, iterator, Args...> type;
return *this->priv_insert_back_aux_impl(1, type(boost::forward<Args>(args)...));
}
}
return (this->end()-1);
}
else{
- typedef container_detail::insert_emplace_proxy<Allocator, iterator, Args...> type;
+ typedef dtl::insert_emplace_proxy<Allocator, iterator, Args...> type;
return this->priv_insert_aux_impl(p, 1, type(boost::forward<Args>(args)...));
}
}
return r;\
}\
else{\
- typedef container_detail::insert_nonmovable_emplace_proxy##N\
+ typedef dtl::insert_nonmovable_emplace_proxy##N\
<Allocator, iterator BOOST_MOVE_I##N BOOST_MOVE_TARG##N> type;\
return *priv_insert_front_aux_impl(1, type(BOOST_MOVE_FWD##N));\
}\
return r;\
}\
else{\
- typedef container_detail::insert_nonmovable_emplace_proxy##N\
+ typedef dtl::insert_nonmovable_emplace_proxy##N\
<Allocator, iterator BOOST_MOVE_I##N BOOST_MOVE_TARG##N> type;\
return *priv_insert_back_aux_impl(1, type(BOOST_MOVE_FWD##N));\
}\
return (--this->end());\
}\
else{\
- typedef container_detail::insert_emplace_proxy_arg##N\
+ typedef dtl::insert_emplace_proxy_arg##N\
<Allocator, iterator BOOST_MOVE_I##N BOOST_MOVE_TARG##N> type;\
return this->priv_insert_aux_impl(p, 1, type(BOOST_MOVE_FWD##N));\
}\
template <class InIt>
iterator insert(const_iterator pos, InIt first, InIt last
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- , typename container_detail::disable_if_or
+ , typename dtl::disable_if_or
< void
- , container_detail::is_convertible<InIt, size_type>
- , container_detail::is_not_input_iterator<InIt>
+ , dtl::is_convertible<InIt, size_type>
+ , dtl::is_not_input_iterator<InIt>
>::type * = 0
#endif
)
template <class FwdIt>
iterator insert(const_iterator p, FwdIt first, FwdIt last
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- , typename container_detail::disable_if_or
+ , typename dtl::disable_if_or
< void
- , container_detail::is_convertible<FwdIt, size_type>
- , container_detail::is_input_iterator<FwdIt>
+ , dtl::is_convertible<FwdIt, size_type>
+ , dtl::is_input_iterator<FwdIt>
>::type * = 0
#endif
)
{
BOOST_ASSERT(this->priv_in_range_or_end(p));
- container_detail::insert_range_proxy<Allocator, FwdIt, iterator> proxy(first);
+ dtl::insert_range_proxy<Allocator, FwdIt, iterator> proxy(first);
return priv_insert_aux_impl(p, boost::container::iterator_distance(first, last), proxy);
}
#endif
|| allocator_traits_type::is_always_equal::value)
{
this->swap_members(x);
- container_detail::bool_<allocator_traits_type::propagate_on_container_swap::value> flag;
- container_detail::swap_alloc(this->alloc(), x.alloc(), flag);
- container_detail::swap_alloc(this->ptr_alloc(), x.ptr_alloc(), flag);
+ dtl::bool_<allocator_traits_type::propagate_on_container_swap::value> flag;
+ dtl::swap_alloc(this->alloc(), x.alloc(), flag);
+ dtl::swap_alloc(this->ptr_alloc(), x.ptr_alloc(), flag);
}
//! <b>Effects</b>: Erases all the elements of the deque.
else {
return priv_insert_aux_impl
( p, (size_type)1
- , container_detail::get_insert_value_proxy<iterator, Allocator>(::boost::forward<U>(x)));
+ , dtl::get_insert_value_proxy<iterator, Allocator>(::boost::forward<U>(x)));
}
}
else{
priv_insert_aux_impl
( this->cbegin(), (size_type)1
- , container_detail::get_insert_value_proxy<iterator, Allocator>(::boost::forward<U>(x)));
+ , dtl::get_insert_value_proxy<iterator, Allocator>(::boost::forward<U>(x)));
}
}
else{
priv_insert_aux_impl
( this->cend(), (size_type)1
- , container_detail::get_insert_value_proxy<iterator, Allocator>(::boost::forward<U>(x)));
+ , dtl::get_insert_value_proxy<iterator, Allocator>(::boost::forward<U>(x)));
}
}
}
else {
size_type new_map_size =
- this->members_.m_map_size + container_detail::max_value(this->members_.m_map_size, nodes_to_add) + 2;
+ this->members_.m_map_size + dtl::max_value(this->members_.m_map_size, nodes_to_add) + 2;
index_pointer new_map = this->priv_allocate_map(new_map_size);
new_nstart = new_map + (new_map_size - new_num_nodes) / 2