summaryrefslogtreecommitdiff
path: root/boost/container/deque.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/container/deque.hpp')
-rw-r--r--boost/container/deque.hpp94
1 files changed, 47 insertions, 47 deletions
diff --git a/boost/container/deque.hpp b/boost/container/deque.hpp
index b838f6e4eb..9565144839 100644
--- a/boost/container/deque.hpp
+++ b/boost/container/deque.hpp
@@ -68,7 +68,7 @@ template <class T>
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;
};
@@ -82,7 +82,7 @@ struct deque_buf_size
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:
@@ -273,7 +273,7 @@ class deque_iterator
{ 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
@@ -323,8 +323,8 @@ class deque_base
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)
@@ -369,7 +369,7 @@ class deque_base
// 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;
@@ -535,7 +535,7 @@ class deque : protected deque_base<Allocator>
//! <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()
{}
@@ -558,7 +558,7 @@ class deque : protected deque_base<Allocator>
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...
}
@@ -575,7 +575,7 @@ class deque : protected deque_base<Allocator>
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...
}
@@ -590,7 +590,7 @@ class deque : protected deque_base<Allocator>
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...
}
@@ -607,7 +607,7 @@ class deque : protected deque_base<Allocator>
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...
}
@@ -644,7 +644,7 @@ class deque : protected deque_base<Allocator>
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
)
@@ -663,7 +663,7 @@ class deque : protected deque_base<Allocator>
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
)
@@ -776,14 +776,14 @@ class deque : protected deque_base<Allocator>
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;
@@ -806,7 +806,7 @@ class deque : protected deque_base<Allocator>
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)
@@ -814,8 +814,8 @@ class deque : protected deque_base<Allocator>
//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);
}
@@ -863,10 +863,10 @@ class deque : protected deque_base<Allocator>
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
)
@@ -886,10 +886,10 @@ class deque : protected deque_base<Allocator>
#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
)
{
@@ -1096,7 +1096,7 @@ class deque : protected deque_base<Allocator>
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);
}
}
@@ -1116,7 +1116,7 @@ class deque : protected deque_base<Allocator>
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);
}
}
@@ -1366,7 +1366,7 @@ class deque : protected deque_base<Allocator>
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)...));
}
}
@@ -1392,7 +1392,7 @@ class deque : protected deque_base<Allocator>
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)...));
}
}
@@ -1419,7 +1419,7 @@ class deque : protected deque_base<Allocator>
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)...));
}
}
@@ -1438,7 +1438,7 @@ class deque : protected deque_base<Allocator>
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));\
}\
@@ -1455,7 +1455,7 @@ class deque : protected deque_base<Allocator>
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));\
}\
@@ -1474,7 +1474,7 @@ class deque : protected deque_base<Allocator>
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));\
}\
@@ -1583,10 +1583,10 @@ class deque : protected deque_base<Allocator>
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
)
@@ -1624,16 +1624,16 @@ class deque : protected deque_base<Allocator>
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
@@ -1748,9 +1748,9 @@ class deque : protected deque_base<Allocator>
|| 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.
@@ -1874,7 +1874,7 @@ class deque : protected deque_base<Allocator>
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)));
}
}
@@ -1889,7 +1889,7 @@ class deque : protected deque_base<Allocator>
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)));
}
}
@@ -1904,7 +1904,7 @@ class deque : protected deque_base<Allocator>
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)));
}
}
@@ -2220,7 +2220,7 @@ class deque : protected deque_base<Allocator>
}
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