Don't use BOOST_CONTAINER_FORCEINLINE extensively, due to potential code bloat

This commit is contained in:
Ion Gaztañaga committed 2023-05-10 22:09:01 +02:00
1 parent 9c852071f9
commit 1a4a205ea6
32 files changed
+1966 -2001

No files matched your search

+101 -101
View File
@@ -81,14 +81,14 @@ template <class C>
class clear_on_destroy
{
public:
BOOST_CONTAINER_FORCEINLINE clear_on_destroy(C &c)
inline clear_on_destroy(C &c)
: c_(c), do_clear_(true)
{}
BOOST_CONTAINER_FORCEINLINE void release()
inline void release()
{ do_clear_ = false; }
BOOST_CONTAINER_FORCEINLINE ~clear_on_destroy()
inline ~clear_on_destroy()
{
if(do_clear_){
c_.clear();
@@ -122,11 +122,11 @@ struct node_base
<node_base_ptr>::type node_base_ptr_ptr;
public:
BOOST_CONTAINER_FORCEINLINE explicit node_base(const node_base_ptr_ptr &n)
inline explicit node_base(const node_base_ptr_ptr &n)
: up(n)
{}
BOOST_CONTAINER_FORCEINLINE node_base()
inline node_base()
: up()
{}
@@ -152,11 +152,11 @@ struct node
<sizeof(T), boost::container::dtl::alignment_of<T>::value>::type storage_t;
storage_t m_storage;
BOOST_CONTAINER_FORCEINLINE explicit node(const typename hook_type::node_base_ptr_ptr &n)
inline explicit node(const typename hook_type::node_base_ptr_ptr &n)
: hook_type(n)
{}
BOOST_CONTAINER_FORCEINLINE node()
inline node()
{}
#if defined(BOOST_GCC) && (BOOST_GCC >= 40600) && (BOOST_GCC < 80000)
@@ -165,19 +165,19 @@ struct node
#define BOOST_CONTAINER_DISABLE_ALIASING_WARNING
# endif
BOOST_CONTAINER_FORCEINLINE T &get_data()
inline T &get_data()
{ return *boost::move_detail::force_ptr<T*>(this->m_storage.data); }
BOOST_CONTAINER_FORCEINLINE const T &get_data() const
inline const T &get_data() const
{ return *boost::move_detail::force_ptr<const T*>(this->m_storage.data); }
BOOST_CONTAINER_FORCEINLINE T *get_data_ptr()
inline T *get_data_ptr()
{ return boost::move_detail::force_ptr<T*>(this->m_storage.data); }
BOOST_CONTAINER_FORCEINLINE const T *get_data_ptr() const
inline const T *get_data_ptr() const
{ return boost::move_detail::force_ptr<const T*>(this->m_storage.data); }
BOOST_CONTAINER_FORCEINLINE ~node()
inline ~node()
{ boost::move_detail::force_ptr<T*>(this->m_storage.data)->~T(); }
#if defined(BOOST_CONTAINER_DISABLE_ALIASING_WARNING)
@@ -185,7 +185,7 @@ struct node
#undef BOOST_CONTAINER_DISABLE_ALIASING_WARNING
# endif
BOOST_CONTAINER_FORCEINLINE void destroy_header()
inline void destroy_header()
{ static_cast<hook_type*>(this)->~hook_type(); }
};
@@ -221,7 +221,7 @@ struct index_traits
// Node cache first is *(this->index.end() - 2);
// Node cache last is this->index.back();
BOOST_CONTAINER_FORCEINLINE static node_base_ptr_ptr ptr_to_node_base_ptr(node_base_ptr &n)
inline static node_base_ptr_ptr ptr_to_node_base_ptr(node_base_ptr &n)
{ return node_base_ptr_ptr_traits::pointer_to(n); }
static void fix_up_pointers(index_iterator first, index_iterator last)
@@ -234,10 +234,10 @@ struct index_traits
}
}
BOOST_CONTAINER_FORCEINLINE static index_iterator get_fix_up_end(index_type &index)
inline static index_iterator get_fix_up_end(index_type &index)
{ return index.end() - (ExtraPointers - 1); }
BOOST_CONTAINER_FORCEINLINE static void fix_up_pointers_from(index_type & index, index_iterator first)
inline static void fix_up_pointers_from(index_type & index, index_iterator first)
{ index_traits::fix_up_pointers(first, index_traits::get_fix_up_end(index)); }
static void readjust_end_node(index_type &index, node_base_type &end_node)
@@ -327,72 +327,72 @@ class stable_vector_iterator
public:
BOOST_CONTAINER_FORCEINLINE explicit stable_vector_iterator(node_base_ptr p) BOOST_NOEXCEPT_OR_NOTHROW
inline explicit stable_vector_iterator(node_base_ptr p) BOOST_NOEXCEPT_OR_NOTHROW
: m_pn(p)
{}
BOOST_CONTAINER_FORCEINLINE stable_vector_iterator() BOOST_NOEXCEPT_OR_NOTHROW
inline stable_vector_iterator() BOOST_NOEXCEPT_OR_NOTHROW
: m_pn() //Value initialization to achieve "null iterators" (N3644)
{}
BOOST_CONTAINER_FORCEINLINE stable_vector_iterator(const stable_vector_iterator& other) BOOST_NOEXCEPT_OR_NOTHROW
inline stable_vector_iterator(const stable_vector_iterator& other) BOOST_NOEXCEPT_OR_NOTHROW
: m_pn(other.node_pointer())
{}
BOOST_CONTAINER_FORCEINLINE stable_vector_iterator(const nonconst_iterator& other) BOOST_NOEXCEPT_OR_NOTHROW
inline stable_vector_iterator(const nonconst_iterator& other) BOOST_NOEXCEPT_OR_NOTHROW
: m_pn(other.node_pointer())
{}
BOOST_CONTAINER_FORCEINLINE stable_vector_iterator & operator=(const stable_vector_iterator& other) BOOST_NOEXCEPT_OR_NOTHROW
inline stable_vector_iterator & operator=(const stable_vector_iterator& other) BOOST_NOEXCEPT_OR_NOTHROW
{ m_pn = other.node_pointer(); return *this; }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
node_ptr node_pointer() const BOOST_NOEXCEPT_OR_NOTHROW
{ return node_ptr_traits::static_cast_from(m_pn); }
public:
//Pointer like operators
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW
{ return node_pointer()->get_data(); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW
{ return ptr_traits::pointer_to(this->operator*()); }
//Increment / Decrement
BOOST_CONTAINER_FORCEINLINE stable_vector_iterator& operator++() BOOST_NOEXCEPT_OR_NOTHROW
inline stable_vector_iterator& operator++() BOOST_NOEXCEPT_OR_NOTHROW
{
node_base_ptr_ptr p(this->m_pn->up);
this->m_pn = *(++p);
return *this;
}
BOOST_CONTAINER_FORCEINLINE stable_vector_iterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW
inline stable_vector_iterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW
{ stable_vector_iterator tmp(*this); ++*this; return stable_vector_iterator(tmp); }
BOOST_CONTAINER_FORCEINLINE stable_vector_iterator& operator--() BOOST_NOEXCEPT_OR_NOTHROW
inline stable_vector_iterator& operator--() BOOST_NOEXCEPT_OR_NOTHROW
{
node_base_ptr_ptr p(this->m_pn->up);
this->m_pn = *(--p);
return *this;
}
BOOST_CONTAINER_FORCEINLINE stable_vector_iterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW
inline stable_vector_iterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW
{ stable_vector_iterator tmp(*this); --*this; return stable_vector_iterator(tmp); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
reference operator[](difference_type off) const BOOST_NOEXCEPT_OR_NOTHROW
{ return node_ptr_traits::static_cast_from(this->m_pn->up[off])->get_data(); }
//Arithmetic
BOOST_CONTAINER_FORCEINLINE stable_vector_iterator& operator+=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
inline stable_vector_iterator& operator+=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
{
if(off) this->m_pn = this->m_pn->up[off];
return *this;
}
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend stable_vector_iterator operator+(const stable_vector_iterator &left, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
{
stable_vector_iterator tmp(left);
@@ -400,7 +400,7 @@ class stable_vector_iterator
return tmp;
}
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend stable_vector_iterator operator+(difference_type off, const stable_vector_iterator& right) BOOST_NOEXCEPT_OR_NOTHROW
{
stable_vector_iterator tmp(right);
@@ -408,10 +408,10 @@ class stable_vector_iterator
return tmp;
}
BOOST_CONTAINER_FORCEINLINE stable_vector_iterator& operator-=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
inline stable_vector_iterator& operator-=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
{ *this += -off; return *this; }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend stable_vector_iterator operator-(const stable_vector_iterator &left, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
{
stable_vector_iterator tmp(left);
@@ -420,32 +420,32 @@ class stable_vector_iterator
}
//Difference
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend difference_type operator-(const stable_vector_iterator &left, const stable_vector_iterator &right) BOOST_NOEXCEPT_OR_NOTHROW
{ return left.m_pn->up - right.m_pn->up; }
//Comparison operators
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator== (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
{ return l.m_pn == r.m_pn; }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator!= (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
{ return l.m_pn != r.m_pn; }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator< (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
{ return l.m_pn->up < r.m_pn->up; }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator<= (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
{ return l.m_pn->up <= r.m_pn->up; }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator> (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
{ return l.m_pn->up > r.m_pn->up; }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator>= (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
{ return l.m_pn->up >= r.m_pn->up; }
};
@@ -554,16 +554,16 @@ class stable_vector
allocator_version_traits<node_allocator_type> allocator_version_traits_t;
typedef typename allocator_version_traits_t::multiallocation_chain multiallocation_chain;
BOOST_CONTAINER_FORCEINLINE node_ptr allocate_one()
inline node_ptr allocate_one()
{ return allocator_version_traits_t::allocate_one(this->priv_node_alloc()); }
BOOST_CONTAINER_FORCEINLINE void deallocate_one(const node_ptr &p)
inline void deallocate_one(const node_ptr &p)
{ allocator_version_traits_t::deallocate_one(this->priv_node_alloc(), p); }
BOOST_CONTAINER_FORCEINLINE void allocate_individual(typename allocator_traits_type::size_type n, multiallocation_chain &m)
inline void allocate_individual(typename allocator_traits_type::size_type n, multiallocation_chain &m)
{ allocator_version_traits_t::allocate_individual(this->priv_node_alloc(), n, m); }
BOOST_CONTAINER_FORCEINLINE void deallocate_individual(multiallocation_chain &holder)
inline void deallocate_individual(multiallocation_chain &holder)
{ allocator_version_traits_t::deallocate_individual(this->priv_node_alloc(), holder); }
friend class stable_vector_detail::clear_on_destroy<stable_vector>;
@@ -619,7 +619,7 @@ class stable_vector
//! <b>Throws</b>: If allocator_type's default constructor throws.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_FORCEINLINE stable_vector() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<ValueAllocator>::value)
inline stable_vector() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<ValueAllocator>::value)
: internal_data(), index()
{
BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT;
@@ -630,7 +630,7 @@ class stable_vector
//! <b>Throws</b>: Nothing
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_FORCEINLINE explicit stable_vector(const allocator_type& al) BOOST_NOEXCEPT_OR_NOTHROW
inline explicit stable_vector(const allocator_type& al) BOOST_NOEXCEPT_OR_NOTHROW
: internal_data(al), index(al)
{
BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT;
@@ -777,7 +777,7 @@ class stable_vector
//! <b>Throws</b>: If allocator_type's copy constructor throws.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_FORCEINLINE stable_vector(BOOST_RV_REF(stable_vector) x) BOOST_NOEXCEPT_OR_NOTHROW
inline stable_vector(BOOST_RV_REF(stable_vector) x) BOOST_NOEXCEPT_OR_NOTHROW
: internal_data(boost::move(x.priv_node_alloc())), index(boost::move(x.index))
{
this->priv_swap_members(x);
@@ -918,7 +918,7 @@ class stable_vector
//! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
//!
//! <b>Complexity</b>: Linear to n.
BOOST_CONTAINER_FORCEINLINE void assign(size_type n, const T& t)
inline void assign(size_type n, const T& t)
{
typedef constant_iterator<value_type> cvalue_iterator;
this->assign(cvalue_iterator(t, n), cvalue_iterator());
@@ -957,7 +957,7 @@ class stable_vector
//! <b>Throws</b>: If memory allocation throws or
//! T's constructor from dereferencing initializer_list iterator throws.
//!
BOOST_CONTAINER_FORCEINLINE void assign(std::initializer_list<value_type> il)
inline void assign(std::initializer_list<value_type> il)
{
BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT;
assign(il.begin(), il.end());
@@ -969,7 +969,7 @@ class stable_vector
//! <b>Throws</b>: If allocator's copy constructor throws.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
allocator_type get_allocator() const
{ return this->priv_node_alloc(); }
@@ -980,7 +980,7 @@ class stable_vector
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->priv_node_alloc(); }
@@ -991,7 +991,7 @@ class stable_vector
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
{ return this->priv_node_alloc(); }
@@ -1006,7 +1006,7 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
{ return (this->index.empty()) ? this->end(): iterator(node_ptr_traits::static_cast_from(this->index.front())); }
@@ -1015,7 +1015,7 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
{ return (this->index.empty()) ? this->cend() : const_iterator(node_ptr_traits::static_cast_from(this->index.front())) ; }
@@ -1024,7 +1024,7 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
iterator end() BOOST_NOEXCEPT_OR_NOTHROW
{ return iterator(this->priv_get_end_node()); }
@@ -1033,7 +1033,7 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
{ return const_iterator(this->priv_get_end_node()); }
@@ -1043,7 +1043,7 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
{ return reverse_iterator(this->end()); }
@@ -1053,7 +1053,7 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
{ return const_reverse_iterator(this->end()); }
@@ -1063,7 +1063,7 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
{ return reverse_iterator(this->begin()); }
@@ -1073,7 +1073,7 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
{ return const_reverse_iterator(this->begin()); }
@@ -1082,7 +1082,7 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->begin(); }
@@ -1091,7 +1091,7 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->end(); }
@@ -1101,7 +1101,7 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->rbegin(); }
@@ -1111,7 +1111,7 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_reverse_iterator crend()const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->rend(); }
@@ -1126,7 +1126,7 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->index.size() <= ExtraPointers; }
@@ -1135,7 +1135,7 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
{
const size_type index_size = this->index.size();
@@ -1147,7 +1147,7 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->index.max_size() - ExtraPointers; }
@@ -1207,7 +1207,7 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
{
const size_type index_size = this->index.size();
@@ -1295,7 +1295,7 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
reference front() BOOST_NOEXCEPT_OR_NOTHROW
{
BOOST_ASSERT(!this->empty());
@@ -1310,7 +1310,7 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
{
BOOST_ASSERT(!this->empty());
@@ -1325,7 +1325,7 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
reference back() BOOST_NOEXCEPT_OR_NOTHROW
{
BOOST_ASSERT(!this->empty());
@@ -1340,7 +1340,7 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
{
BOOST_ASSERT(!this->empty());
@@ -1355,7 +1355,7 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW
{
BOOST_ASSERT(this->size() > n);
@@ -1370,7 +1370,7 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
{
BOOST_ASSERT(this->size() > n);
@@ -1388,7 +1388,7 @@ class stable_vector
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
{
BOOST_ASSERT(this->size() >= n);
@@ -1406,7 +1406,7 @@ class stable_vector
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
{
BOOST_ASSERT(this->size() >= n);
@@ -1423,7 +1423,7 @@ class stable_vector
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
{ return this->priv_index_of(p.node_pointer()); }
@@ -1437,7 +1437,7 @@ class stable_vector
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->priv_index_of(p.node_pointer()); }
@@ -1449,7 +1449,7 @@ class stable_vector
//! <b>Throws</b>: range_error if n >= size()
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
reference at(size_type n)
{
if(n >= this->size()){
@@ -1466,7 +1466,7 @@ class stable_vector
//! <b>Throws</b>: range_error if n >= size()
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_reference at(size_type n)const
{
if(n >= this->size()){
@@ -1626,7 +1626,7 @@ class stable_vector
//! <b>Returns</b>: an iterator to the first inserted element or p if first == last.
//!
//! <b>Complexity</b>: Linear to distance [il.begin(), il.end()).
BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, std::initializer_list<value_type> il)
inline iterator insert(const_iterator p, std::initializer_list<value_type> il)
{
//Position checks done by insert()
BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT;
@@ -1713,7 +1713,7 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant time.
BOOST_CONTAINER_FORCEINLINE void pop_back() BOOST_NOEXCEPT_OR_NOTHROW
inline void pop_back() BOOST_NOEXCEPT_OR_NOTHROW
{
BOOST_ASSERT(!this->empty());
this->erase(--this->cend());
@@ -1725,7 +1725,7 @@ class stable_vector
//!
//! <b>Complexity</b>: Linear to the elements between p and the
//! last element. Constant if p is the last element.
BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator p) BOOST_NOEXCEPT_OR_NOTHROW
inline iterator erase(const_iterator p) BOOST_NOEXCEPT_OR_NOTHROW
{
BOOST_ASSERT(this->priv_in_range(p));
BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT;
@@ -1797,55 +1797,55 @@ class stable_vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Linear to the number of elements in the stable_vector.
BOOST_CONTAINER_FORCEINLINE void clear() BOOST_NOEXCEPT_OR_NOTHROW
inline void clear() BOOST_NOEXCEPT_OR_NOTHROW
{ this->erase(this->cbegin(),this->cend()); }
//! <b>Effects</b>: Returns true if x and y are equal
//!
//! <b>Complexity</b>: Linear to the number of elements in the container.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator==(const stable_vector& x, const stable_vector& 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.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator!=(const stable_vector& x, const stable_vector& 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.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator<(const stable_vector& x, const stable_vector& 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.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator>(const stable_vector& x, const stable_vector& 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.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator<=(const stable_vector& x, const stable_vector& 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.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator>=(const stable_vector& x, const stable_vector& y)
{ return !(x < y); }
//! <b>Effects</b>: x.swap(y)
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_FORCEINLINE friend void swap(stable_vector& x, stable_vector& y)
inline friend void swap(stable_vector& x, stable_vector& y)
BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT(x.swap(y)))
{ x.swap(y); }
@@ -1857,12 +1857,12 @@ class stable_vector
return (this->begin() <= pos) && (pos < this->end());
}
BOOST_CONTAINER_FORCEINLINE bool priv_in_range_or_end(const_iterator pos) const
inline bool priv_in_range_or_end(const_iterator pos) const
{
return (this->begin() <= pos) && (pos <= this->end());
}
BOOST_CONTAINER_FORCEINLINE size_type priv_index_of(node_ptr p) const
inline size_type priv_index_of(node_ptr p) const
{
//Check range
BOOST_ASSERT(this->index.empty() || (this->index.data() <= p->up));
@@ -1896,18 +1896,18 @@ class stable_vector
class push_back_rollback
{
public:
BOOST_CONTAINER_FORCEINLINE push_back_rollback(stable_vector &sv, const node_ptr &p)
inline push_back_rollback(stable_vector &sv, const node_ptr &p)
: m_sv(sv), m_p(p)
{}
BOOST_CONTAINER_FORCEINLINE ~push_back_rollback()
inline ~push_back_rollback()
{
if(m_p){
m_sv.priv_put_in_pool(m_p);
}
}
BOOST_CONTAINER_FORCEINLINE void release()
inline void release()
{ m_p = node_ptr(); }
private:
@@ -1937,7 +1937,7 @@ class stable_vector
return index_beg + (difference_type)idx;
}
BOOST_CONTAINER_FORCEINLINE bool priv_capacity_bigger_than_size() const
inline bool priv_capacity_bigger_than_size() const
{
return this->index.capacity() > this->index.size() &&
this->internal_data.pool_size > 0;
@@ -2070,16 +2070,16 @@ class stable_vector
return ret;
}
BOOST_CONTAINER_FORCEINLINE node_base_ptr priv_get_end_node() const
inline node_base_ptr priv_get_end_node() const
{ return node_base_ptr_traits::pointer_to(const_cast<node_base_type&>(this->internal_data.end_node)); }
BOOST_CONTAINER_FORCEINLINE void priv_destroy_node(const node_type &n)
inline void priv_destroy_node(const node_type &n)
{
allocator_traits<node_allocator_type>::
destroy(this->priv_node_alloc(), &n);
}
BOOST_CONTAINER_FORCEINLINE void priv_delete_node(const node_ptr &n)
inline void priv_delete_node(const node_ptr &n)
{
this->priv_destroy_node(*n);
this->priv_put_in_pool(n);