Add BOOST_CONTAINER_FORCEINLINE

This commit is contained in:
Ion Gaztañaga
2019-03-05 12:11:43 +01:00
parent c987400947
commit 2b3775985e
5 changed files with 324 additions and 324 deletions
+104 -104
View File
@@ -141,16 +141,16 @@ class deque_iterator
public:
Pointer get_cur() const { return m_cur; }
Pointer get_first() const { return m_first; }
Pointer get_last() const { return m_last; }
index_pointer get_node() const { return m_node; }
BOOST_CONTAINER_FORCEINLINE Pointer get_cur() const { return m_cur; }
BOOST_CONTAINER_FORCEINLINE Pointer get_first() const { return m_first; }
BOOST_CONTAINER_FORCEINLINE Pointer get_last() const { return m_last; }
BOOST_CONTAINER_FORCEINLINE index_pointer get_node() const { return m_node; }
deque_iterator(val_alloc_ptr x, index_pointer y) BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE deque_iterator(val_alloc_ptr x, index_pointer y) BOOST_NOEXCEPT_OR_NOTHROW
: m_cur(x), m_first(*y), m_last(*y + s_buffer_size()), m_node(y)
{}
deque_iterator() BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE deque_iterator() BOOST_NOEXCEPT_OR_NOTHROW
: m_cur(), m_first(), m_last(), m_node() //Value initialization to achieve "null iterators" (N3644)
{}
@@ -167,10 +167,10 @@ class deque_iterator
return deque_iterator<Pointer, false>(this->get_cur(), this->get_first(), this->get_last(), this->get_node());
}
reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW
{ return *this->m_cur; }
pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->m_cur; }
difference_type operator-(const deque_iterator& x) const BOOST_NOEXCEPT_OR_NOTHROW
@@ -192,7 +192,7 @@ class deque_iterator
return *this;
}
deque_iterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE deque_iterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW
{
deque_iterator tmp(*this);
++*this;
@@ -209,7 +209,7 @@ class deque_iterator
return *this;
}
deque_iterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE deque_iterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW
{
deque_iterator tmp(*this);
--*this;
@@ -232,44 +232,44 @@ class deque_iterator
return *this;
}
deque_iterator operator+(difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE deque_iterator operator+(difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW
{ deque_iterator tmp(*this); return tmp += n; }
deque_iterator& operator-=(difference_type n) BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE deque_iterator& operator-=(difference_type n) BOOST_NOEXCEPT_OR_NOTHROW
{ return *this += -n; }
deque_iterator operator-(difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE deque_iterator operator-(difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW
{ deque_iterator tmp(*this); return tmp -= n; }
reference operator[](difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE reference operator[](difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW
{ return *(*this + n); }
friend bool operator==(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE friend bool operator==(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
{ return l.m_cur == r.m_cur; }
friend bool operator!=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
{ return l.m_cur != r.m_cur; }
friend bool operator<(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE friend bool operator<(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
{ return (l.m_node == r.m_node) ? (l.m_cur < r.m_cur) : (l.m_node < r.m_node); }
friend bool operator>(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE friend bool operator>(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
{ return r < l; }
friend bool operator<=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
{ return !(r < l); }
friend bool operator>=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
{ return !(l < r); }
void priv_set_node(index_pointer new_node) BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE void priv_set_node(index_pointer new_node) BOOST_NOEXCEPT_OR_NOTHROW
{
this->m_node = new_node;
this->m_first = *new_node;
this->m_last = this->m_first + this->s_buffer_size();
}
friend deque_iterator operator+(difference_type n, deque_iterator x) BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE friend deque_iterator operator+(difference_type n, deque_iterator x) BOOST_NOEXCEPT_OR_NOTHROW
{ return x += n; }
};
@@ -308,37 +308,37 @@ class deque_base
typedef deque_value_traits<val_alloc_val> traits_t;
typedef ptr_alloc_t map_allocator_type;
static size_type s_buffer_size() BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE static size_type s_buffer_size() BOOST_NOEXCEPT_OR_NOTHROW
{ return deque_buf_size<val_alloc_val>::value; }
val_alloc_ptr priv_allocate_node()
BOOST_CONTAINER_FORCEINLINE val_alloc_ptr priv_allocate_node()
{ return this->alloc().allocate(s_buffer_size()); }
void priv_deallocate_node(val_alloc_ptr p) BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE void priv_deallocate_node(val_alloc_ptr p) BOOST_NOEXCEPT_OR_NOTHROW
{ this->alloc().deallocate(p, s_buffer_size()); }
ptr_alloc_ptr priv_allocate_map(size_type n)
BOOST_CONTAINER_FORCEINLINE ptr_alloc_ptr priv_allocate_map(size_type n)
{ return this->ptr_alloc().allocate(n); }
void priv_deallocate_map(ptr_alloc_ptr p, size_type n) BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE void priv_deallocate_map(ptr_alloc_ptr p, size_type n) BOOST_NOEXCEPT_OR_NOTHROW
{ this->ptr_alloc().deallocate(p, n); }
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)
BOOST_CONTAINER_FORCEINLINE deque_base(size_type num_elements, const allocator_type& a)
: members_(a)
{ this->priv_initialize_map(num_elements); }
explicit deque_base(const allocator_type& a)
BOOST_CONTAINER_FORCEINLINE explicit deque_base(const allocator_type& a)
: members_(a)
{}
deque_base()
BOOST_CONTAINER_FORCEINLINE deque_base()
: members_()
{}
explicit deque_base(BOOST_RV_REF(deque_base) x)
BOOST_CONTAINER_FORCEINLINE explicit deque_base(BOOST_RV_REF(deque_base) x)
: members_( boost::move(x.ptr_alloc())
, boost::move(x.alloc()) )
{}
@@ -459,16 +459,16 @@ class deque_base
iterator m_finish;
} members_;
ptr_alloc_t &ptr_alloc() BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE ptr_alloc_t &ptr_alloc() BOOST_NOEXCEPT_OR_NOTHROW
{ return members_; }
const ptr_alloc_t &ptr_alloc() const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE const ptr_alloc_t &ptr_alloc() const BOOST_NOEXCEPT_OR_NOTHROW
{ return members_; }
allocator_type &alloc() BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE allocator_type &alloc() BOOST_NOEXCEPT_OR_NOTHROW
{ return members_; }
const allocator_type &alloc() const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE const allocator_type &alloc() const BOOST_NOEXCEPT_OR_NOTHROW
{ return members_; }
};
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
@@ -518,7 +518,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
private: // Internal typedefs
BOOST_COPYABLE_AND_MOVABLE(deque)
typedef typename Base::ptr_alloc_ptr index_pointer;
static size_type s_buffer_size()
BOOST_CONTAINER_FORCEINLINE static size_type s_buffer_size()
{ return Base::s_buffer_size(); }
typedef allocator_traits<ValAllocator> allocator_traits_type;
@@ -536,7 +536,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: If allocator_type's default constructor throws.
//!
//! <b>Complexity</b>: Constant.
deque() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<ValAllocator>::value)
BOOST_CONTAINER_FORCEINLINE deque() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<ValAllocator>::value)
: Base()
{}
@@ -545,7 +545,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing
//!
//! <b>Complexity</b>: Constant.
explicit deque(const allocator_type& a) BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE explicit deque(const allocator_type& a) BOOST_NOEXCEPT_OR_NOTHROW
: Base(a)
{}
@@ -556,7 +556,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! throws or T's value initialization throws.
//!
//! <b>Complexity</b>: Linear to n.
explicit deque(size_type n)
BOOST_CONTAINER_FORCEINLINE explicit deque(size_type n)
: Base(n, allocator_type())
{
dtl::insert_value_initialized_n_proxy<ValAllocator, iterator> proxy;
@@ -573,7 +573,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Complexity</b>: Linear to n.
//!
//! <b>Note</b>: Non-standard extension
deque(size_type n, default_init_t)
BOOST_CONTAINER_FORCEINLINE deque(size_type n, default_init_t)
: Base(n, allocator_type())
{
dtl::insert_default_initialized_n_proxy<ValAllocator, iterator> proxy;
@@ -588,7 +588,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! throws or T's value initialization throws.
//!
//! <b>Complexity</b>: Linear to n.
explicit deque(size_type n, const allocator_type &a)
BOOST_CONTAINER_FORCEINLINE explicit deque(size_type n, const allocator_type &a)
: Base(n, a)
{
dtl::insert_value_initialized_n_proxy<ValAllocator, iterator> proxy;
@@ -605,7 +605,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Complexity</b>: Linear to n.
//!
//! <b>Note</b>: Non-standard extension
deque(size_type n, default_init_t, const allocator_type &a)
BOOST_CONTAINER_FORCEINLINE deque(size_type n, default_init_t, const allocator_type &a)
: Base(n, a)
{
dtl::insert_default_initialized_n_proxy<ValAllocator, iterator> proxy;
@@ -620,7 +620,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! throws or T's copy constructor throws.
//!
//! <b>Complexity</b>: Linear to n.
deque(size_type n, const value_type& value)
BOOST_CONTAINER_FORCEINLINE deque(size_type n, const value_type& value)
: Base(n, allocator_type())
{ this->priv_fill_initialize(value); }
@@ -631,7 +631,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! throws or T's copy constructor throws.
//!
//! <b>Complexity</b>: Linear to n.
deque(size_type n, const value_type& value, const allocator_type& a)
BOOST_CONTAINER_FORCEINLINE deque(size_type n, const value_type& value, const allocator_type& a)
: Base(n, a)
{ this->priv_fill_initialize(value); }
@@ -643,7 +643,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//!
//! <b>Complexity</b>: Linear to the range [first, last).
template <class InIt>
deque(InIt first, InIt last
BOOST_CONTAINER_FORCEINLINE deque(InIt first, InIt last
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
, typename dtl::disable_if_convertible
<InIt, size_type>::type * = 0
@@ -662,7 +662,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//!
//! <b>Complexity</b>: Linear to the range [first, last).
template <class InIt>
deque(InIt first, InIt last, const allocator_type& a
BOOST_CONTAINER_FORCEINLINE deque(InIt first, InIt last, const allocator_type& a
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
, typename dtl::disable_if_convertible
<InIt, size_type>::type * = 0
@@ -681,7 +681,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! throws or T's constructor taking a dereferenced std::initializer_list iterator throws.
//!
//! <b>Complexity</b>: Linear to the range [il.begin(), il.end()).
deque(std::initializer_list<value_type> il, const allocator_type& a = allocator_type())
BOOST_CONTAINER_FORCEINLINE deque(std::initializer_list<value_type> il, const allocator_type& a = allocator_type())
: Base(a)
{
this->priv_range_initialize(il.begin(), il.end());
@@ -693,7 +693,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Postcondition</b>: x == *this.
//!
//! <b>Complexity</b>: Linear to the elements x contains.
deque(const deque& x)
BOOST_CONTAINER_FORCEINLINE deque(const deque& x)
: Base(allocator_traits_type::select_on_container_copy_construction(x.alloc()))
{
if(x.size()){
@@ -708,7 +708,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: If allocator_type's copy constructor throws.
//!
//! <b>Complexity</b>: Constant.
deque(BOOST_RV_REF(deque) x) BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE deque(BOOST_RV_REF(deque) x) BOOST_NOEXCEPT_OR_NOTHROW
: Base(BOOST_MOVE_BASE(Base, x))
{ this->swap_members(x); }
@@ -759,7 +759,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Linear to the number of elements.
~deque() BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE ~deque() BOOST_NOEXCEPT_OR_NOTHROW
{
this->priv_destroy_range(this->members_.m_start, this->members_.m_finish);
}
@@ -837,7 +837,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
//!
//! <b>Complexity</b>: Linear to the number of elements in il.
deque& operator=(std::initializer_list<value_type> il)
BOOST_CONTAINER_FORCEINLINE deque& operator=(std::initializer_list<value_type> il)
{
this->assign(il.begin(), il.end());
return *this;
@@ -849,7 +849,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
//!
//! <b>Complexity</b>: Linear to n.
void assign(size_type n, const T& val)
BOOST_CONTAINER_FORCEINLINE void assign(size_type n, const T& val)
{
typedef constant_iterator<value_type, difference_type> c_it;
this->assign(c_it(val, n), c_it());
@@ -914,7 +914,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! T's constructor from dereferencing std::initializer_list iterator throws.
//!
//! <b>Complexity</b>: Linear to il.size().
void assign(std::initializer_list<value_type> il)
BOOST_CONTAINER_FORCEINLINE void assign(std::initializer_list<value_type> il)
{ this->assign(il.begin(), il.end()); }
#endif
@@ -923,7 +923,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: If allocator's copy constructor throws.
//!
//! <b>Complexity</b>: Constant.
allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
{ return Base::alloc(); }
//! <b>Effects</b>: Returns a reference to the internal allocator.
@@ -933,7 +933,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension.
const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
{ return Base::alloc(); }
//////////////////////////////////////////////
@@ -949,7 +949,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension.
stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
{ return Base::alloc(); }
//! <b>Effects</b>: Returns an iterator to the first element contained in the deque.
@@ -957,7 +957,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
{ return this->members_.m_start; }
//! <b>Effects</b>: Returns a const_iterator to the first element contained in the deque.
@@ -965,7 +965,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->members_.m_start; }
//! <b>Effects</b>: Returns an iterator to the end of the deque.
@@ -973,7 +973,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
iterator end() BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE iterator end() BOOST_NOEXCEPT_OR_NOTHROW
{ return this->members_.m_finish; }
//! <b>Effects</b>: Returns a const_iterator to the end of the deque.
@@ -981,7 +981,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->members_.m_finish; }
//! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
@@ -990,7 +990,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
{ return reverse_iterator(this->members_.m_finish); }
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
@@ -999,7 +999,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
{ return const_reverse_iterator(this->members_.m_finish); }
//! <b>Effects</b>: Returns a reverse_iterator pointing to the end
@@ -1008,7 +1008,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
{ return reverse_iterator(this->members_.m_start); }
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
@@ -1017,7 +1017,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
{ return const_reverse_iterator(this->members_.m_start); }
//! <b>Effects</b>: Returns a const_iterator to the first element contained in the deque.
@@ -1025,7 +1025,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->members_.m_start; }
//! <b>Effects</b>: Returns a const_iterator to the end of the deque.
@@ -1033,7 +1033,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->members_.m_finish; }
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
@@ -1042,7 +1042,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
{ return const_reverse_iterator(this->members_.m_finish); }
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
@@ -1051,7 +1051,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
{ return const_reverse_iterator(this->members_.m_start); }
//////////////////////////////////////////////
@@ -1065,7 +1065,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->members_.m_finish == this->members_.m_start; }
//! <b>Effects</b>: Returns the number of the elements contained in the deque.
@@ -1073,7 +1073,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->members_.m_finish - this->members_.m_start; }
//! <b>Effects</b>: Returns the largest possible size of the deque.
@@ -1081,7 +1081,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
{ return allocator_traits_type::max_size(this->alloc()); }
//! <b>Effects</b>: Inserts or erases elements at the end such that
@@ -1168,7 +1168,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
reference front() BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE reference front() BOOST_NOEXCEPT_OR_NOTHROW
{
BOOST_ASSERT(!this->empty());
return *this->members_.m_start;
@@ -1182,7 +1182,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
{
BOOST_ASSERT(!this->empty());
return *this->members_.m_start;
@@ -1196,7 +1196,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
reference back() BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE reference back() BOOST_NOEXCEPT_OR_NOTHROW
{
BOOST_ASSERT(!this->empty());
return *(end()-1);
@@ -1210,7 +1210,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
{
BOOST_ASSERT(!this->empty());
return *(cend()-1);
@@ -1224,7 +1224,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW
{
BOOST_ASSERT(this->size() > n);
return this->members_.m_start[difference_type(n)];
@@ -1238,7 +1238,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
{
BOOST_ASSERT(this->size() > n);
return this->members_.m_start[difference_type(n)];
@@ -1255,7 +1255,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension
iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
{
BOOST_ASSERT(this->size() >= n);
return iterator(this->begin()+n);
@@ -1272,7 +1272,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension
const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
{
BOOST_ASSERT(this->size() >= n);
return const_iterator(this->cbegin()+n);
@@ -1288,7 +1288,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension
size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
{
//Range checked priv_index_of
return this->priv_index_of(p);
@@ -1304,7 +1304,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension
size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
BOOST_CONTAINER_FORCEINLINE size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
{
//Range checked priv_index_of
return this->priv_index_of(p);
@@ -1318,7 +1318,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: std::range_error if n >= size()
//!
//! <b>Complexity</b>: Constant.
reference at(size_type n)
BOOST_CONTAINER_FORCEINLINE reference at(size_type n)
{
this->priv_throw_if_out_of_range(n);
return (*this)[n];
@@ -1332,7 +1332,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: std::range_error if n >= size()
//!
//! <b>Complexity</b>: Constant.
const_reference at(size_type n) const
BOOST_CONTAINER_FORCEINLINE const_reference at(size_type n) const
{
this->priv_throw_if_out_of_range(n);
return (*this)[n];
@@ -1564,7 +1564,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
//!
//! <b>Complexity</b>: Linear to n.
iterator insert(const_iterator pos, size_type n, const value_type& x)
BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator pos, size_type n, const value_type& x)
{
//Range check of p is done by insert()
typedef constant_iterator<value_type, difference_type> c_it;
@@ -1614,7 +1614,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! dereferenced std::initializer_list throws or T's copy constructor throws.
//!
//! <b>Complexity</b>: Linear to distance [il.begin(), il.end()).
iterator insert(const_iterator pos, std::initializer_list<value_type> il)
BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator pos, std::initializer_list<value_type> il)
{
//Range check os pos is done in insert()
return insert(pos, il.begin(), il.end());
@@ -1623,7 +1623,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
template <class FwdIt>
iterator insert(const_iterator p, FwdIt first, FwdIt last
BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, FwdIt first, FwdIt last
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
, typename dtl::disable_if_or
< void
@@ -1744,7 +1744,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
void swap(deque &x)
BOOST_CONTAINER_FORCEINLINE void swap(deque &x)
BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_swap::value
|| allocator_traits_type::is_always_equal::value)
{
@@ -1782,49 +1782,49 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
//! <b>Effects</b>: Returns true if x and y are equal
//!
//! <b>Complexity</b>: Linear to the number of elements in the container.
friend bool operator==(const deque& x, const deque& y)
BOOST_CONTAINER_FORCEINLINE friend bool operator==(const deque& x, const deque& y)
{ return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
//! <b>Effects</b>: Returns true if x and y are unequal
//!
//! <b>Complexity</b>: Linear to the number of elements in the container.
friend bool operator!=(const deque& x, const deque& y)
BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const deque& x, const deque& y)
{ return !(x == y); }
//! <b>Effects</b>: Returns true if x is less than y
//!
//! <b>Complexity</b>: Linear to the number of elements in the container.
friend bool operator<(const deque& x, const deque& y)
BOOST_CONTAINER_FORCEINLINE friend bool operator<(const deque& x, const deque& y)
{ return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
//! <b>Effects</b>: Returns true if x is greater than y
//!
//! <b>Complexity</b>: Linear to the number of elements in the container.
friend bool operator>(const deque& x, const deque& y)
BOOST_CONTAINER_FORCEINLINE friend bool operator>(const deque& x, const deque& y)
{ return y < x; }
//! <b>Effects</b>: Returns true if x is equal or less than y
//!
//! <b>Complexity</b>: Linear to the number of elements in the container.
friend bool operator<=(const deque& x, const deque& y)
BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const deque& x, const deque& y)
{ return !(y < x); }
//! <b>Effects</b>: Returns true if x is equal or greater than y
//!
//! <b>Complexity</b>: Linear to the number of elements in the container.
friend bool operator>=(const deque& x, const deque& y)
BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const deque& x, const deque& y)
{ return !(x < y); }
//! <b>Effects</b>: x.swap(y)
//!
//! <b>Complexity</b>: Constant.
friend void swap(deque& x, deque& y)
BOOST_CONTAINER_FORCEINLINE friend void swap(deque& x, deque& y)
{ x.swap(y); }
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
private:
size_type priv_index_of(const_iterator p) const
BOOST_CONTAINER_FORCEINLINE size_type priv_index_of(const_iterator p) const
{
BOOST_ASSERT(this->cbegin() <= p);
BOOST_ASSERT(p <= this->cend());
@@ -1850,12 +1850,12 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
throw_out_of_range("deque::at out of range");
}
bool priv_in_range(const_iterator pos) const
BOOST_CONTAINER_FORCEINLINE bool priv_in_range(const_iterator pos) const
{
return (this->begin() <= pos) && (pos < this->end());
}
bool priv_in_range_or_end(const_iterator pos) const
BOOST_CONTAINER_FORCEINLINE bool priv_in_range_or_end(const_iterator pos) const
{
return (this->begin() <= pos) && (pos <= this->end());
}
@@ -1909,32 +1909,32 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
}
}
bool priv_push_back_simple_available() const
BOOST_CONTAINER_FORCEINLINE bool priv_push_back_simple_available() const
{
return this->members_.m_map &&
(this->members_.m_finish.m_cur != (this->members_.m_finish.m_last - 1));
}
T *priv_push_back_simple_pos() const
BOOST_CONTAINER_FORCEINLINE T *priv_push_back_simple_pos() const
{
return boost::movelib::to_raw_pointer(this->members_.m_finish.m_cur);
}
void priv_push_back_simple_commit()
BOOST_CONTAINER_FORCEINLINE void priv_push_back_simple_commit()
{
++this->members_.m_finish.m_cur;
}
bool priv_push_front_simple_available() const
BOOST_CONTAINER_FORCEINLINE bool priv_push_front_simple_available() const
{
return this->members_.m_map &&
(this->members_.m_start.m_cur != this->members_.m_start.m_first);
}
T *priv_push_front_simple_pos() const
BOOST_CONTAINER_FORCEINLINE T *priv_push_front_simple_pos() const
{ return boost::movelib::to_raw_pointer(this->members_.m_start.m_cur) - 1; }
void priv_push_front_simple_commit()
BOOST_CONTAINER_FORCEINLINE void priv_push_front_simple_commit()
{ --this->members_.m_start.m_cur; }
void priv_destroy_range(iterator p, iterator p2)
@@ -2061,7 +2061,7 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type>
return new_start;
}
iterator priv_fill_insert(const_iterator pos, size_type n, const value_type& x)
BOOST_CONTAINER_FORCEINLINE iterator priv_fill_insert(const_iterator pos, size_type n, const value_type& x)
{
typedef constant_iterator<value_type, difference_type> c_it;
return this->insert(pos, c_it(x, n), c_it());