mirror of
https://github.com/boostorg/container.git
synced 2025-07-31 21:14:30 +02:00
Add support for [[nodiscard]]:
- Decorate container and allocator functions. - Make sure to disable warnings in tests - Update doxygen documentation to support it
This commit is contained in:
@@ -22,6 +22,11 @@
|
||||
#include <boost/move/detail/nsec_clock.hpp>
|
||||
#include <typeinfo>
|
||||
|
||||
#if defined(BOOST_GCC) && (BOOST_GCC >= 40500)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-result"
|
||||
#endif
|
||||
|
||||
//capacity
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME capacity
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace test {
|
||||
@@ -30,6 +35,11 @@
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 0
|
||||
#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
|
||||
|
||||
//#pragma GCC diagnostic ignored "-Wunused-result"
|
||||
#if defined(BOOST_GCC) && (BOOST_GCC >= 40500)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
using boost::move_detail::cpu_timer;
|
||||
using boost::move_detail::cpu_times;
|
||||
using boost::move_detail::nanosecond_type;
|
||||
|
@@ -40,6 +40,8 @@ doxygen autodoc
|
||||
\"BOOST_RV_REF_END_IF_CXX11=&&\" \\
|
||||
\"BOOST_COPY_ASSIGN_REF(T)=const T &\" \\
|
||||
\"BOOST_FWD_REF(a)=a &&\" \\
|
||||
\"BOOST_CONTAINER_ATTRIBUTE_NODISCARD=[[nodiscard]] \" \\
|
||||
\"BOOST_NORETURN=[[noreturn]] \" \\
|
||||
\"BOOST_INTRUSIVE_OPTION_CONSTANT(OPTION_NAME, TYPE, VALUE, CONSTANT_NAME) = template<TYPE VALUE> struct OPTION_NAME{};\" \\
|
||||
\"BOOST_INTRUSIVE_OPTION_TYPE(OPTION_NAME, TYPE, TYPEDEF_EXPR, TYPEDEF_NAME) = template<class TYPE> struct OPTION_NAME{};\" \\
|
||||
\"BOOST_CONTAINER_DOC1ST(T1, T2)=T1\" \\
|
||||
|
@@ -177,7 +177,7 @@ class allocator
|
||||
//!Throws std::bad_alloc if there is no enough memory
|
||||
//!If Version is 2, this allocated memory can only be deallocated
|
||||
//!with deallocate() or (for Version == 2) deallocate_many()
|
||||
pointer allocate(size_type count, const void * hint= 0)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD pointer allocate(size_type count, const void * hint= 0)
|
||||
{
|
||||
(void)hint;
|
||||
if(count > size_type(-1)/(2u*sizeof(T)))
|
||||
@@ -205,19 +205,21 @@ class allocator
|
||||
|
||||
//!An allocator always compares to true, as memory allocated with one
|
||||
//!instance can be deallocated by another instance
|
||||
friend bool operator==(const allocator &, const allocator &) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD
|
||||
friend bool operator==(const allocator &, const allocator &) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return true; }
|
||||
|
||||
//!An allocator always compares to false, as memory allocated with one
|
||||
//!instance can be deallocated by another instance
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const allocator &, const allocator &) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator!=(const allocator &, const allocator &) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return false; }
|
||||
|
||||
//!An advanced function that offers in-place expansion shrink to fit and new allocation
|
||||
//!capabilities. Memory allocated with this function can only be deallocated with deallocate()
|
||||
//!or deallocate_many().
|
||||
//!This function is available only with Version == 2
|
||||
pointer allocation_command(allocation_type command,
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD pointer allocation_command(allocation_type command,
|
||||
size_type limit_size,
|
||||
size_type &prefer_in_recvd_out_size,
|
||||
pointer &reuse)
|
||||
@@ -236,7 +238,7 @@ class allocator
|
||||
//!Memory must not have been allocated with
|
||||
//!allocate_one or allocate_individual.
|
||||
//!This function is available only with Version == 2
|
||||
size_type size(pointer p) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD size_type size(pointer p) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_STATIC_ASSERT(( Version > 1 ));
|
||||
return dlmalloc_size(p);
|
||||
@@ -246,7 +248,7 @@ class allocator
|
||||
//!must be deallocated only with deallocate_one().
|
||||
//!Throws bad_alloc if there is no enough memory
|
||||
//!This function is available only with Version == 2
|
||||
BOOST_CONTAINER_FORCEINLINE pointer allocate_one()
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE pointer allocate_one()
|
||||
{
|
||||
BOOST_STATIC_ASSERT(( Version > 1 ));
|
||||
return this->allocate(1);
|
||||
@@ -273,7 +275,8 @@ class allocator
|
||||
|
||||
//!Deallocates memory allocated with allocate_one() or allocate_individual().
|
||||
//!This function is available only with Version == 2
|
||||
BOOST_CONTAINER_FORCEINLINE void deallocate_individual(multiallocation_chain &chain) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
void deallocate_individual(multiallocation_chain &chain) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_STATIC_ASSERT(( Version > 1 ));
|
||||
return this->deallocate_many(chain);
|
||||
|
@@ -49,6 +49,11 @@
|
||||
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
#if defined(BOOST_GCC) && (BOOST_GCC >= 40500)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-result"
|
||||
#endif
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME allocate
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
@@ -70,6 +75,10 @@
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 9
|
||||
#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
|
||||
|
||||
#if defined(BOOST_GCC) && (BOOST_GCC >= 40500)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
namespace boost {
|
||||
|
@@ -142,10 +142,10 @@ class deque_iterator
|
||||
|
||||
public:
|
||||
|
||||
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; }
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE Pointer get_cur() const { return m_cur; }
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE Pointer get_first() const { return m_first; }
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE Pointer get_last() const { return m_last; }
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE index_pointer get_node() const { return m_node; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE deque_iterator(val_alloc_ptr x, index_pointer y, difference_type block_size) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
: m_cur(x), m_first(*y), m_last(*y + block_size), m_node(y)
|
||||
@@ -181,7 +181,7 @@ class deque_iterator
|
||||
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
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD difference_type operator-(const deque_iterator& x) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
if(!this->m_cur && !x.m_cur){
|
||||
return 0;
|
||||
@@ -253,45 +253,56 @@ class deque_iterator
|
||||
return *this;
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE deque_iterator operator+(difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
deque_iterator operator+(difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ deque_iterator tmp(*this); return tmp += n; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE 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; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE deque_iterator operator-(difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
deque_iterator operator-(difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ deque_iterator tmp(*this); return tmp -= n; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE reference operator[](difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reference operator[](difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return *(*this + n); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator==(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator<(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator>(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator>(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return r < l; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator<=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return !(r < l); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator>=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return !(l < r); }
|
||||
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend deque_iterator operator+(difference_type n, deque_iterator x) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return x += n; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE void priv_set_node(index_pointer new_node, difference_type block_size) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
this->m_node = new_node;
|
||||
this->m_first = *new_node;
|
||||
this->m_last = this->m_first + block_size;
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend deque_iterator operator+(difference_type n, deque_iterator x) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return x += n; }
|
||||
};
|
||||
|
||||
} //namespace dtl {
|
||||
@@ -575,7 +586,8 @@ 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.
|
||||
BOOST_CONTAINER_FORCEINLINE 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()
|
||||
{}
|
||||
|
||||
@@ -963,7 +975,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: If allocator's copy constructor throws.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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.
|
||||
@@ -973,7 +986,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
BOOST_CONTAINER_FORCEINLINE const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return Base::alloc(); }
|
||||
|
||||
//////////////////////////////////////////////
|
||||
@@ -989,7 +1003,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
BOOST_CONTAINER_FORCEINLINE stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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.
|
||||
@@ -997,7 +1012,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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.
|
||||
@@ -1005,7 +1021,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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.
|
||||
@@ -1013,7 +1030,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE iterator end() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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.
|
||||
@@ -1021,7 +1039,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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
|
||||
@@ -1030,7 +1049,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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
|
||||
@@ -1039,7 +1059,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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
|
||||
@@ -1048,7 +1069,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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
|
||||
@@ -1057,7 +1079,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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.
|
||||
@@ -1065,7 +1088,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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.
|
||||
@@ -1073,7 +1097,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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
|
||||
@@ -1082,7 +1107,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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
|
||||
@@ -1091,7 +1117,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return const_reverse_iterator(this->members_.m_start); }
|
||||
|
||||
//////////////////////////////////////////////
|
||||
@@ -1105,7 +1132,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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.
|
||||
@@ -1113,7 +1141,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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.
|
||||
@@ -1121,7 +1150,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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
|
||||
@@ -1208,7 +1238,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE reference front() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reference front() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(!this->empty());
|
||||
return *this->members_.m_start;
|
||||
@@ -1222,7 +1253,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(!this->empty());
|
||||
return *this->members_.m_start;
|
||||
@@ -1236,7 +1268,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE reference back() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reference back() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(!this->empty());
|
||||
return *(end()-1);
|
||||
@@ -1250,7 +1283,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(!this->empty());
|
||||
return *(cend()-1);
|
||||
@@ -1264,7 +1298,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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)];
|
||||
@@ -1278,7 +1313,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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)];
|
||||
@@ -1295,7 +1331,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension
|
||||
BOOST_CONTAINER_FORCEINLINE iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(this->size() >= n);
|
||||
return iterator(this->begin()+n);
|
||||
@@ -1312,7 +1349,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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);
|
||||
@@ -1328,7 +1366,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension
|
||||
BOOST_CONTAINER_FORCEINLINE size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
//Range checked priv_index_of
|
||||
return this->priv_index_of(p);
|
||||
@@ -1344,7 +1383,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension
|
||||
BOOST_CONTAINER_FORCEINLINE size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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);
|
||||
@@ -1358,7 +1398,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: std::range_error if n >= size()
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE reference at(size_type n)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reference at(size_type n)
|
||||
{
|
||||
this->priv_throw_if_out_of_range(n);
|
||||
return (*this)[n];
|
||||
@@ -1372,7 +1413,8 @@ class deque : protected deque_base<typename real_allocator<T, Allocator>::type,
|
||||
//! <b>Throws</b>: std::range_error if n >= size()
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reference at(size_type n) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reference at(size_type n) const
|
||||
{
|
||||
this->priv_throw_if_out_of_range(n);
|
||||
return (*this)[n];
|
||||
@@ -1822,37 +1864,43 @@ 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.
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator==(const deque& x, const deque& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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.
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const deque& x, const deque& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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.
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator<(const deque& x, const deque& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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.
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator>(const deque& x, const deque& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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.
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const deque& x, const deque& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD 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.
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const deque& x, const deque& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator>=(const deque& x, const deque& y)
|
||||
{ return !(x < y); }
|
||||
|
||||
//! <b>Effects</b>: x.swap(y)
|
||||
|
@@ -55,6 +55,11 @@
|
||||
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
#if defined(BOOST_GCC) && (BOOST_GCC >= 40500)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-result"
|
||||
#endif
|
||||
|
||||
//merge_unique
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME merge_unique
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl {
|
||||
@@ -103,6 +108,11 @@
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 0
|
||||
#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
|
||||
|
||||
#if defined(BOOST_GCC) && (BOOST_GCC >= 40500)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
namespace boost {
|
||||
@@ -726,68 +736,88 @@ class flat_tree
|
||||
|
||||
public:
|
||||
// accessors:
|
||||
BOOST_CONTAINER_FORCEINLINE Compare key_comp() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
Compare key_comp() const
|
||||
{ return this->m_data.get_comp(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE value_compare value_comp() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
value_compare value_comp() const
|
||||
{ return this->m_data; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE allocator_type get_allocator() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
allocator_type get_allocator() const
|
||||
{ return this->m_data.m_seq.get_allocator(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE get_stored_allocator_const_return_t get_stored_allocator() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
get_stored_allocator_const_return_t get_stored_allocator() const
|
||||
{
|
||||
return flat_tree_get_stored_allocator(this->m_data.m_seq, dtl::bool_<has_stored_allocator_type>());
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE get_stored_allocator_noconst_return_t get_stored_allocator()
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
get_stored_allocator_noconst_return_t get_stored_allocator()
|
||||
{
|
||||
return flat_tree_get_stored_allocator(this->m_data.m_seq, dtl::bool_<has_stored_allocator_type>());
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE iterator begin()
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator begin()
|
||||
{ return this->m_data.m_seq.begin(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator begin() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator begin() const
|
||||
{ return this->cbegin(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator cbegin() const
|
||||
{ return this->m_data.m_seq.begin(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE iterator end()
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator end()
|
||||
{ return this->m_data.m_seq.end(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator end() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator end() const
|
||||
{ return this->cend(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator cend() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator cend() const
|
||||
{ return this->m_data.m_seq.end(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin()
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reverse_iterator rbegin()
|
||||
{ return reverse_iterator(this->end()); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator rbegin() const
|
||||
{ return this->crbegin(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator crbegin() const
|
||||
{ return const_reverse_iterator(this->cend()); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE reverse_iterator rend()
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reverse_iterator rend()
|
||||
{ return reverse_iterator(this->begin()); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator rend() const
|
||||
{ return this->crend(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator crend() const
|
||||
{ return const_reverse_iterator(this->cbegin()); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE bool empty() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
bool empty() const
|
||||
{ return this->m_data.m_seq.empty(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE size_type size() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type size() const
|
||||
{ return this->m_data.m_seq.size(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE size_type max_size() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type max_size() const
|
||||
{ return this->m_data.m_seq.max_size(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE void swap(flat_tree& other)
|
||||
@@ -1116,21 +1146,24 @@ class flat_tree
|
||||
return flat_tree_nth<iterator>(this->m_data.m_seq, n, dtl::bool_<value>());
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
const bool value = boost::container::dtl::
|
||||
has_member_function_callable_with_nth<container_type, size_type>::value;
|
||||
return flat_tree_nth<const_iterator>(this->m_data.m_seq, n, dtl::bool_<value>());
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
const bool value = boost::container::dtl::
|
||||
has_member_function_callable_with_index_of<container_type, iterator>::value;
|
||||
return flat_tree_index_of(this->m_data.m_seq, p, dtl::bool_<value>());
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
const bool value = boost::container::dtl::
|
||||
has_member_function_callable_with_index_of<container_type, const_iterator>::value;
|
||||
@@ -1138,7 +1171,8 @@ class flat_tree
|
||||
}
|
||||
|
||||
// set operations:
|
||||
iterator find(const key_type& k)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD
|
||||
iterator find(const key_type& k)
|
||||
{
|
||||
iterator i = this->lower_bound(k);
|
||||
iterator end_it = this->end();
|
||||
@@ -1148,6 +1182,7 @@ class flat_tree
|
||||
return i;
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD
|
||||
const_iterator find(const key_type& k) const
|
||||
{
|
||||
const_iterator i = this->lower_bound(k);
|
||||
@@ -1160,7 +1195,8 @@ class flat_tree
|
||||
}
|
||||
|
||||
template<class K>
|
||||
typename dtl::enable_if_transparent<key_compare, K, iterator>::type
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD
|
||||
typename dtl::enable_if_transparent<key_compare, K, iterator>::type
|
||||
find(const K& k)
|
||||
{
|
||||
iterator i = this->lower_bound(k);
|
||||
@@ -1172,7 +1208,8 @@ class flat_tree
|
||||
}
|
||||
|
||||
template<class K>
|
||||
typename dtl::enable_if_transparent<key_compare, K, const_iterator>::type
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD
|
||||
typename dtl::enable_if_transparent<key_compare, K, const_iterator>::type
|
||||
find(const K& k) const
|
||||
{
|
||||
const_iterator i = this->lower_bound(k);
|
||||
@@ -1184,7 +1221,8 @@ class flat_tree
|
||||
return i;
|
||||
}
|
||||
|
||||
size_type count(const key_type& k) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD
|
||||
size_type count(const key_type& k) const
|
||||
{
|
||||
std::pair<const_iterator, const_iterator> p = this->equal_range(k);
|
||||
size_type n = p.second - p.first;
|
||||
@@ -1192,7 +1230,8 @@ class flat_tree
|
||||
}
|
||||
|
||||
template<class K>
|
||||
typename dtl::enable_if_transparent<key_compare, K, size_type>::type
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD
|
||||
typename dtl::enable_if_transparent<key_compare, K, size_type>::type
|
||||
count(const K& k) const
|
||||
{
|
||||
std::pair<const_iterator, const_iterator> p = this->equal_range(k);
|
||||
@@ -1200,11 +1239,11 @@ class flat_tree
|
||||
return n;
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE bool contains(const key_type& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE bool contains(const key_type& x) const
|
||||
{ return this->find(x) != this->cend(); }
|
||||
|
||||
template<typename K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, bool>::type
|
||||
contains(const K& x) const
|
||||
{ return this->find(x) != this->cend(); }
|
||||
@@ -1247,99 +1286,111 @@ class flat_tree
|
||||
, dtl::bool_<value>());
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const key_type& k)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator lower_bound(const key_type& k)
|
||||
{ return this->priv_lower_bound(this->begin(), this->end(), k); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const key_type& k) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator lower_bound(const key_type& k) const
|
||||
{ return this->priv_lower_bound(this->cbegin(), this->cend(), k); }
|
||||
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, iterator>::type
|
||||
lower_bound(const K& k)
|
||||
{ return this->priv_lower_bound(this->begin(), this->end(), k); }
|
||||
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, const_iterator>::type
|
||||
lower_bound(const K& k) const
|
||||
{ return this->priv_lower_bound(this->cbegin(), this->cend(), k); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const key_type& k)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator upper_bound(const key_type& k)
|
||||
{ return this->priv_upper_bound(this->begin(), this->end(), k); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const key_type& k) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator upper_bound(const key_type& k) const
|
||||
{ return this->priv_upper_bound(this->cbegin(), this->cend(), k); }
|
||||
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K,iterator>::type
|
||||
upper_bound(const K& k)
|
||||
{ return this->priv_upper_bound(this->begin(), this->end(), k); }
|
||||
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K,const_iterator>::type
|
||||
upper_bound(const K& k) const
|
||||
{ return this->priv_upper_bound(this->cbegin(), this->cend(), k); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type& k)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
std::pair<iterator,iterator> equal_range(const key_type& k)
|
||||
{ return this->priv_equal_range(this->begin(), this->end(), k); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const key_type& k) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
std::pair<const_iterator, const_iterator> equal_range(const key_type& k) const
|
||||
{ return this->priv_equal_range(this->cbegin(), this->cend(), k); }
|
||||
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K,std::pair<iterator,iterator> >::type
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, std::pair<iterator,iterator> >::type
|
||||
equal_range(const K& k)
|
||||
{ return this->priv_equal_range(this->begin(), this->end(), k); }
|
||||
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K,std::pair<const_iterator,const_iterator> >::type
|
||||
equal_range(const K& k) const
|
||||
{ return this->priv_equal_range(this->cbegin(), this->cend(), k); }
|
||||
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE std::pair<iterator, iterator> lower_bound_range(const key_type& k)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
std::pair<iterator, iterator> lower_bound_range(const key_type& k)
|
||||
{ return this->priv_lower_bound_range(this->begin(), this->end(), k); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> lower_bound_range(const key_type& k) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
std::pair<const_iterator, const_iterator> lower_bound_range(const key_type& k) const
|
||||
{ return this->priv_lower_bound_range(this->cbegin(), this->cend(), k); }
|
||||
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K,std::pair<iterator,iterator> >::type
|
||||
lower_bound_range(const K& k)
|
||||
{ return this->priv_lower_bound_range(this->begin(), this->end(), k); }
|
||||
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K,std::pair<const_iterator,const_iterator> >::type
|
||||
lower_bound_range(const K& k) const
|
||||
{ return this->priv_lower_bound_range(this->cbegin(), this->cend(), k); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE size_type capacity() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type capacity() const
|
||||
{
|
||||
const bool value = boost::container::dtl::
|
||||
has_member_function_callable_with_capacity<container_type>::value;
|
||||
return (flat_tree_capacity)(this->m_data.m_seq, dtl::bool_<value>());
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE void reserve(size_type cnt)
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
void reserve(size_type cnt)
|
||||
{
|
||||
const bool value = boost::container::dtl::
|
||||
has_member_function_callable_with_reserve<container_type, size_type>::value;
|
||||
(flat_tree_reserve)(this->m_data.m_seq, cnt, dtl::bool_<value>());
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE container_type extract_sequence()
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
container_type extract_sequence()
|
||||
{
|
||||
return boost::move(m_data.m_seq);
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE container_type &get_sequence_ref()
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
container_type &get_sequence_ref()
|
||||
{
|
||||
return m_data.m_seq;
|
||||
}
|
||||
@@ -1368,26 +1419,32 @@ class flat_tree
|
||||
m_data.m_seq = boost::move(seq);
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator==(const flat_tree& x, const flat_tree& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator==(const flat_tree& x, const flat_tree& y)
|
||||
{
|
||||
return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin());
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator<(const flat_tree& x, const flat_tree& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator<(const flat_tree& x, const flat_tree& y)
|
||||
{
|
||||
return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end());
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const flat_tree& x, const flat_tree& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator!=(const flat_tree& x, const flat_tree& y)
|
||||
{ return !(x == y); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator>(const flat_tree& x, const flat_tree& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator>(const flat_tree& x, const flat_tree& y)
|
||||
{ return y < x; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const flat_tree& x, const flat_tree& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator<=(const flat_tree& x, const flat_tree& y)
|
||||
{ return !(y < x); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const flat_tree& x, const flat_tree& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator>=(const flat_tree& x, const flat_tree& y)
|
||||
{ return !(x < y); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend void swap(flat_tree& x, flat_tree& y)
|
||||
|
@@ -18,6 +18,11 @@
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_GCC) && (BOOST_GCC >= 40500)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-result"
|
||||
#endif
|
||||
|
||||
//empty
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME empty
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace is_container_detail {
|
||||
@@ -34,6 +39,11 @@
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 0
|
||||
#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
|
||||
|
||||
//#pragma GCC diagnostic ignored "-Wunused-result"
|
||||
#if defined(BOOST_GCC) && (BOOST_GCC >= 40500)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace dtl {
|
||||
|
@@ -18,6 +18,11 @@
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_GCC) && (BOOST_GCC >= 40500)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-result"
|
||||
#endif
|
||||
|
||||
//data
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME data
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace is_contiguous_container_detail {
|
||||
@@ -34,6 +39,11 @@
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 0
|
||||
#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
|
||||
|
||||
//#pragma GCC diagnostic ignored "-Wunused-result"
|
||||
#if defined(BOOST_GCC) && (BOOST_GCC >= 40500)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace dtl {
|
||||
|
@@ -864,43 +864,57 @@ class tree
|
||||
|
||||
public:
|
||||
// accessors:
|
||||
BOOST_CONTAINER_FORCEINLINE value_compare value_comp() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
value_compare value_comp() const
|
||||
{ return this->icont().value_comp().predicate(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE key_compare key_comp() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
key_compare key_comp() const
|
||||
{ return this->icont().value_comp().predicate().key_comp(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE allocator_type get_allocator() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
allocator_type get_allocator() const
|
||||
{ return allocator_type(this->node_alloc()); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const stored_allocator_type &get_stored_allocator() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const stored_allocator_type &get_stored_allocator() const
|
||||
{ return this->node_alloc(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE stored_allocator_type &get_stored_allocator()
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
stored_allocator_type &get_stored_allocator()
|
||||
{ return this->node_alloc(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE iterator begin()
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator begin()
|
||||
{ return iterator(this->icont().begin()); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator begin() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator begin() const
|
||||
{ return this->cbegin(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE iterator end()
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator end()
|
||||
{ return iterator(this->icont().end()); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator end() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator end() const
|
||||
{ return this->cend(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin()
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reverse_iterator rbegin()
|
||||
{ return reverse_iterator(end()); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const
|
||||
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator rbegin() const
|
||||
{ return this->crbegin(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE reverse_iterator rend()
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reverse_iterator rend()
|
||||
{ return reverse_iterator(begin()); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator rend() const
|
||||
{ return this->crend(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
|
||||
@@ -908,7 +922,8 @@ class tree
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator cbegin() const
|
||||
{ return const_iterator(this->non_const_icont().begin()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the end of the container.
|
||||
@@ -916,7 +931,8 @@ class tree
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator cend() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator cend() const
|
||||
{ return const_iterator(this->non_const_icont().end()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
|
||||
@@ -925,7 +941,8 @@ class tree
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator crbegin() const
|
||||
{ return const_reverse_iterator(cend()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
|
||||
@@ -934,16 +951,20 @@ class tree
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator crend() const
|
||||
{ return const_reverse_iterator(cbegin()); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE bool empty() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
bool empty() const
|
||||
{ return !this->size(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE size_type size() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type size() const
|
||||
{ return this->icont().size(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE size_type max_size() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type max_size() const
|
||||
{ return AllocHolder::max_size(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE void swap(ThisType& x)
|
||||
@@ -1331,86 +1352,96 @@ class tree
|
||||
|
||||
// search operations. Const and non-const overloads even if no iterator is returned
|
||||
// so splay implementations can to their rebalancing when searching in non-const versions
|
||||
BOOST_CONTAINER_FORCEINLINE iterator find(const key_type& k)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator find(const key_type& k)
|
||||
{ return iterator(this->icont().find(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator find(const key_type& k) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator find(const key_type& k) const
|
||||
{ return const_iterator(this->non_const_icont().find(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, iterator>::type
|
||||
find(const K& k)
|
||||
{ return iterator(this->icont().find(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, const_iterator>::type
|
||||
find(const K& k) const
|
||||
{ return const_iterator(this->non_const_icont().find(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& k) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type count(const key_type& k) const
|
||||
{ return size_type(this->icont().count(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, size_type>::type
|
||||
count(const K& k) const
|
||||
{ return size_type(this->icont().count(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE bool contains(const key_type& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
bool contains(const key_type& x) const
|
||||
{ return this->find(x) != this->cend(); }
|
||||
|
||||
template<typename K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, bool>::type
|
||||
contains(const K& x) const
|
||||
{ return this->find(x) != this->cend(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const key_type& k)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator lower_bound(const key_type& k)
|
||||
{ return iterator(this->icont().lower_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const key_type& k) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator lower_bound(const key_type& k) const
|
||||
{ return const_iterator(this->non_const_icont().lower_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, iterator>::type
|
||||
lower_bound(const K& k)
|
||||
{ return iterator(this->icont().lower_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, const_iterator>::type
|
||||
lower_bound(const K& k) const
|
||||
{ return const_iterator(this->non_const_icont().lower_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const key_type& k)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator upper_bound(const key_type& k)
|
||||
{ return iterator(this->icont().upper_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const key_type& k) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator upper_bound(const key_type& k) const
|
||||
{ return const_iterator(this->non_const_icont().upper_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, iterator>::type
|
||||
upper_bound(const K& k)
|
||||
{ return iterator(this->icont().upper_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, const_iterator>::type
|
||||
upper_bound(const K& k) const
|
||||
{ return const_iterator(this->non_const_icont().upper_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
std::pair<iterator,iterator> equal_range(const key_type& k)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
std::pair<iterator,iterator> equal_range(const key_type& k)
|
||||
{
|
||||
std::pair<iiterator, iiterator> ret =
|
||||
this->icont().equal_range(k, KeyNodeCompare(key_comp()));
|
||||
return std::pair<iterator,iterator>(iterator(ret.first), iterator(ret.second));
|
||||
}
|
||||
|
||||
std::pair<const_iterator, const_iterator> equal_range(const key_type& k) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
std::pair<const_iterator, const_iterator> equal_range(const key_type& k) const
|
||||
{
|
||||
std::pair<iiterator, iiterator> ret =
|
||||
this->non_const_icont().equal_range(k, KeyNodeCompare(key_comp()));
|
||||
@@ -1419,7 +1450,7 @@ class tree
|
||||
}
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, std::pair<iterator,iterator> >::type
|
||||
equal_range(const K& k)
|
||||
{
|
||||
@@ -1429,7 +1460,7 @@ class tree
|
||||
}
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, std::pair<const_iterator, const_iterator> >::type
|
||||
equal_range(const K& k) const
|
||||
{
|
||||
@@ -1439,14 +1470,16 @@ class tree
|
||||
(const_iterator(ret.first), const_iterator(ret.second));
|
||||
}
|
||||
|
||||
std::pair<iterator,iterator> lower_bound_range(const key_type& k)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
std::pair<iterator,iterator> lower_bound_range(const key_type& k)
|
||||
{
|
||||
std::pair<iiterator, iiterator> ret =
|
||||
this->icont().lower_bound_range(k, KeyNodeCompare(key_comp()));
|
||||
return std::pair<iterator,iterator>(iterator(ret.first), iterator(ret.second));
|
||||
}
|
||||
|
||||
std::pair<const_iterator, const_iterator> lower_bound_range(const key_type& k) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
std::pair<const_iterator, const_iterator> lower_bound_range(const key_type& k) const
|
||||
{
|
||||
std::pair<iiterator, iiterator> ret =
|
||||
this->non_const_icont().lower_bound_range(k, KeyNodeCompare(key_comp()));
|
||||
@@ -1455,7 +1488,7 @@ class tree
|
||||
}
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, std::pair<iterator,iterator> >::type
|
||||
lower_bound_range(const K& k)
|
||||
{
|
||||
@@ -1465,7 +1498,7 @@ class tree
|
||||
}
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, std::pair<const_iterator, const_iterator> >::type
|
||||
lower_bound_range(const K& k) const
|
||||
{
|
||||
@@ -1478,22 +1511,28 @@ class tree
|
||||
BOOST_CONTAINER_FORCEINLINE void rebalance()
|
||||
{ intrusive_tree_proxy_t::rebalance(this->icont()); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator==(const tree& x, const tree& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator==(const tree& x, const tree& y)
|
||||
{ return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator<(const tree& x, const tree& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator<(const tree& x, const tree& y)
|
||||
{ return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const tree& x, const tree& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator!=(const tree& x, const tree& y)
|
||||
{ return !(x == y); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator>(const tree& x, const tree& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator>(const tree& x, const tree& y)
|
||||
{ return y < x; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const tree& x, const tree& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator<=(const tree& x, const tree& y)
|
||||
{ return !(y < x); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const tree& x, const tree& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator>=(const tree& x, const tree& y)
|
||||
{ return !(x < y); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend void swap(tree& x, tree& y)
|
||||
|
@@ -139,4 +139,16 @@
|
||||
#define BOOST_CONTAINER_NO_CXX17_CTAD
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_CONTAINER_DISABLE_ATTRIBUTE_NODISCARD)
|
||||
#define BOOST_CONTAINER_ATTRIBUTE_NODISCARD
|
||||
#else
|
||||
#if defined(BOOST_GCC) && ((BOOST_GCC < 100000) || (__cplusplus < 201703L))
|
||||
//Avoid using it in C++ < 17 and GCC < 10 because it warns in SFINAE contexts
|
||||
//(see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89070)
|
||||
#define BOOST_CONTAINER_ATTRIBUTE_NODISCARD
|
||||
#else
|
||||
#define BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_ATTRIBUTE_NODISCARD
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP
|
||||
|
@@ -748,17 +748,20 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
allocator_type get_allocator() const BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
allocator_type get_allocator() const BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast<const allocator_type&>(m_);
|
||||
}
|
||||
|
||||
const allocator_type &get_stored_allocator() const BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const allocator_type &get_stored_allocator() const BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast<const allocator_type&>(m_);
|
||||
}
|
||||
|
||||
allocator_type &get_stored_allocator() BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
allocator_type &get_stored_allocator() BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast<allocator_type&>(m_);
|
||||
}
|
||||
@@ -771,7 +774,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
iterator begin() BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator begin() BOOST_NOEXCEPT
|
||||
{
|
||||
return m_.buffer + m_.front_idx;
|
||||
}
|
||||
@@ -782,7 +786,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
const_iterator begin() const BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator begin() const BOOST_NOEXCEPT
|
||||
{
|
||||
return m_.buffer + m_.front_idx;
|
||||
}
|
||||
@@ -792,7 +797,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
iterator end() BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator end() BOOST_NOEXCEPT
|
||||
{
|
||||
return m_.buffer + m_.back_idx;
|
||||
}
|
||||
@@ -802,7 +808,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
const_iterator end() const BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator end() const BOOST_NOEXCEPT
|
||||
{
|
||||
return m_.buffer + m_.back_idx;
|
||||
}
|
||||
@@ -813,7 +820,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT
|
||||
{
|
||||
return reverse_iterator(m_.buffer + m_.back_idx);
|
||||
}
|
||||
@@ -825,7 +833,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT
|
||||
{
|
||||
return const_reverse_iterator(m_.buffer + m_.back_idx);
|
||||
}
|
||||
@@ -836,7 +845,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
reverse_iterator rend() BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reverse_iterator rend() BOOST_NOEXCEPT
|
||||
{
|
||||
return reverse_iterator(m_.buffer + m_.front_idx);
|
||||
}
|
||||
@@ -847,7 +857,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT
|
||||
{
|
||||
return const_reverse_iterator(m_.buffer + m_.front_idx);
|
||||
}
|
||||
@@ -858,7 +869,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT
|
||||
{
|
||||
return m_.buffer + m_.front_idx;
|
||||
}
|
||||
@@ -880,7 +892,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT
|
||||
{
|
||||
return const_reverse_iterator(m_.buffer + m_.back_idx);
|
||||
}
|
||||
@@ -891,7 +904,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT
|
||||
{
|
||||
return const_reverse_iterator(m_.buffer + m_.front_idx);
|
||||
}
|
||||
@@ -903,7 +917,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
bool empty() const BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
bool empty() const BOOST_NOEXCEPT
|
||||
{
|
||||
return m_.front_idx == m_.back_idx;
|
||||
}
|
||||
@@ -913,7 +928,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
size_type size() const BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type size() const BOOST_NOEXCEPT
|
||||
{
|
||||
return m_.back_idx - m_.front_idx;
|
||||
}
|
||||
@@ -923,7 +939,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
size_type max_size() const BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type max_size() const BOOST_NOEXCEPT
|
||||
{
|
||||
size_type alloc_max = allocator_traits_type::max_size(get_allocator_ref());
|
||||
size_type size_type_max = (size_type)-1;
|
||||
@@ -935,7 +952,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
size_type capacity() const BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type capacity() const BOOST_NOEXCEPT
|
||||
{
|
||||
return m_.capacity;
|
||||
}
|
||||
@@ -946,7 +964,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
size_type front_free_capacity() const BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type front_free_capacity() const BOOST_NOEXCEPT
|
||||
{
|
||||
return m_.front_idx;
|
||||
}
|
||||
@@ -957,7 +976,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
size_type back_free_capacity() const BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type back_free_capacity() const BOOST_NOEXCEPT
|
||||
{
|
||||
return m_.capacity - m_.back_idx;
|
||||
}
|
||||
@@ -1212,10 +1232,10 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
reference operator[](size_type n) BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reference operator[](size_type n) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT(n < size());
|
||||
|
||||
return *(begin() + n);
|
||||
}
|
||||
|
||||
@@ -1226,7 +1246,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
const_reference operator[](size_type n) const BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reference operator[](size_type n) const BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT(n < size());
|
||||
|
||||
@@ -1240,7 +1261,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
reference at(size_type n)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reference at(size_type n)
|
||||
{
|
||||
if (size() <= n)
|
||||
throw_out_of_range("devector::at out of range");
|
||||
@@ -1254,7 +1276,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
const_reference at(size_type n) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reference at(size_type n) const
|
||||
{
|
||||
if (size() <= n)
|
||||
throw_out_of_range("devector::at out of range");
|
||||
@@ -1268,7 +1291,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
reference front() BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reference front() BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT(!empty());
|
||||
|
||||
@@ -1282,7 +1306,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
const_reference front() const BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reference front() const BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT(!empty());
|
||||
|
||||
@@ -1296,7 +1321,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
reference back() BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reference back() BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT(!empty());
|
||||
|
||||
@@ -1310,7 +1336,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
const_reference back() const BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reference back() const BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT(!empty());
|
||||
|
||||
@@ -1324,7 +1351,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
T* data() BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
T* data() BOOST_NOEXCEPT
|
||||
{
|
||||
return boost::movelib::to_raw_pointer(m_.buffer) + m_.front_idx;
|
||||
}
|
||||
@@ -1336,7 +1364,8 @@ class devector
|
||||
*
|
||||
* **Complexity**: Constant.
|
||||
*/
|
||||
const T* data() const BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const T* data() const BOOST_NOEXCEPT
|
||||
{
|
||||
return boost::movelib::to_raw_pointer(m_.buffer) + m_.front_idx;
|
||||
}
|
||||
@@ -1946,22 +1975,28 @@ class devector
|
||||
m_.front_idx = m_.back_idx = 0;
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator==(const devector& x, const devector& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator==(const devector& x, const devector& y)
|
||||
{ return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const devector& x, const devector& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator!=(const devector& x, const devector& y)
|
||||
{ return !(x == y); }
|
||||
|
||||
friend bool operator< (const devector& x, const devector& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator< (const devector& x, const devector& y)
|
||||
{ return boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator>(const devector& x, const devector& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator>(const devector& x, const devector& y)
|
||||
{ return y < x; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const devector& x, const devector& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator<=(const devector& x, const devector& y)
|
||||
{ return !(y < x); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const devector& x, const devector& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator>=(const devector& x, const devector& y)
|
||||
{ return !(x < y); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend void swap(devector& x, devector& y)
|
||||
@@ -1970,10 +2005,10 @@ class devector
|
||||
private:
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
T* raw_begin() BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_FORCEINLINE T* raw_begin() BOOST_NOEXCEPT
|
||||
{ return boost::movelib::to_raw_pointer(m_.buffer) + m_.front_idx; }
|
||||
|
||||
T* raw_end() BOOST_NOEXCEPT
|
||||
BOOST_CONTAINER_FORCEINLINE T* raw_end() BOOST_NOEXCEPT
|
||||
{ return boost::movelib::to_raw_pointer(m_.buffer) + m_.back_idx; }
|
||||
|
||||
|
||||
@@ -2096,12 +2131,12 @@ class devector
|
||||
|
||||
#endif //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
size_type front_capacity() const
|
||||
BOOST_CONTAINER_FORCEINLINE size_type front_capacity() const
|
||||
{
|
||||
return m_.back_idx;
|
||||
}
|
||||
|
||||
size_type back_capacity() const
|
||||
BOOST_CONTAINER_FORCEINLINE size_type back_capacity() const
|
||||
{
|
||||
return m_.capacity - m_.front_idx;
|
||||
}
|
||||
|
@@ -503,7 +503,8 @@ class flat_map
|
||||
//! was passed to the object's constructor.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<allocator_type>(m_flat_tree.get_allocator()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reference to the internal allocator.
|
||||
@@ -513,7 +514,8 @@ class flat_map
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
BOOST_CONTAINER_FORCEINLINE get_stored_allocator_noconst_return_t get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
get_stored_allocator_noconst_return_t get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
impl_get_stored_allocator_noconst_return_t r = m_flat_tree.get_stored_allocator();
|
||||
return dtl::force<stored_allocator_type>(r);
|
||||
@@ -526,7 +528,8 @@ class flat_map
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
BOOST_CONTAINER_FORCEINLINE get_stored_allocator_const_return_t get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
get_stored_allocator_const_return_t get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
impl_get_stored_allocator_const_return_t r = m_flat_tree.get_stored_allocator();
|
||||
return dtl::force<const stored_allocator_type>(r);
|
||||
@@ -543,7 +546,8 @@ class flat_map
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<iterator>(m_flat_tree.begin()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
|
||||
@@ -551,7 +555,8 @@ class flat_map
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<const_iterator>(m_flat_tree.begin()); }
|
||||
|
||||
//! <b>Effects</b>: Returns an iterator to the end of the container.
|
||||
@@ -559,7 +564,8 @@ class flat_map
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE iterator end() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator end() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<iterator>(m_flat_tree.end()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the end of the container.
|
||||
@@ -567,7 +573,8 @@ class flat_map
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<const_iterator>(m_flat_tree.end()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
|
||||
@@ -576,7 +583,8 @@ class flat_map
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<reverse_iterator>(m_flat_tree.rbegin()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
|
||||
@@ -585,7 +593,8 @@ class flat_map
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<const_reverse_iterator>(m_flat_tree.rbegin()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reverse_iterator pointing to the end
|
||||
@@ -594,7 +603,8 @@ class flat_map
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<reverse_iterator>(m_flat_tree.rend()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
|
||||
@@ -603,7 +613,8 @@ class flat_map
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<const_reverse_iterator>(m_flat_tree.rend()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
|
||||
@@ -611,7 +622,8 @@ class flat_map
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<const_iterator>(m_flat_tree.cbegin()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the end of the container.
|
||||
@@ -619,7 +631,8 @@ class flat_map
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<const_iterator>(m_flat_tree.cend()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
|
||||
@@ -628,7 +641,8 @@ class flat_map
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<const_reverse_iterator>(m_flat_tree.crbegin()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
|
||||
@@ -637,7 +651,8 @@ class flat_map
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<const_reverse_iterator>(m_flat_tree.crend()); }
|
||||
|
||||
//////////////////////////////////////////////
|
||||
@@ -651,7 +666,8 @@ class flat_map
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return m_flat_tree.empty(); }
|
||||
|
||||
//! <b>Effects</b>: Returns the number of the elements contained in the container.
|
||||
@@ -659,7 +675,8 @@ class flat_map
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return m_flat_tree.size(); }
|
||||
|
||||
//! <b>Effects</b>: Returns the largest possible size of the container.
|
||||
@@ -667,7 +684,8 @@ class flat_map
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return m_flat_tree.max_size(); }
|
||||
|
||||
//! <b>Effects</b>: Number of elements for which memory has been allocated.
|
||||
@@ -676,7 +694,8 @@ class flat_map
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return m_flat_tree.capacity(); }
|
||||
|
||||
//! <b>Effects</b>: If n is less than or equal to capacity(), or the
|
||||
@@ -822,19 +841,23 @@ class flat_map
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::nth(size_type)
|
||||
BOOST_CONTAINER_FORCEINLINE iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<iterator>(m_flat_tree.nth(n)); }
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::nth(size_type) const
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<iterator>(m_flat_tree.nth(n)); }
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::index_of(iterator)
|
||||
BOOST_CONTAINER_FORCEINLINE size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return m_flat_tree.index_of(dtl::force_copy<impl_iterator>(p)); }
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::index_of(const_iterator) const
|
||||
BOOST_CONTAINER_FORCEINLINE size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return m_flat_tree.index_of(dtl::force_copy<impl_const_iterator>(p)); }
|
||||
|
||||
//! Returns: A reference to the element whose key is equivalent to x.
|
||||
@@ -842,7 +865,7 @@ class flat_map
|
||||
//! Throws: An exception object of type out_of_range if no such element is present.
|
||||
//!
|
||||
//! Complexity: logarithmic.
|
||||
T& at(const key_type& k)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD T& at(const key_type& k)
|
||||
{
|
||||
iterator i = this->find(k);
|
||||
if(i == this->end()){
|
||||
@@ -856,7 +879,7 @@ class flat_map
|
||||
//! Throws: An exception object of type out_of_range if no such element is present.
|
||||
//!
|
||||
//! Complexity: logarithmic.
|
||||
const T& at(const key_type& k) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD const T& at(const key_type& k) const
|
||||
{
|
||||
const_iterator i = this->find(k);
|
||||
if(i == this->end()){
|
||||
@@ -1287,14 +1310,16 @@ class flat_map
|
||||
//! of which a was constructed.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE key_compare key_comp() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
key_compare key_comp() const
|
||||
{ return dtl::force_copy<key_compare>(m_flat_tree.key_comp()); }
|
||||
|
||||
//! <b>Effects</b>: Returns an object of value_compare constructed out
|
||||
//! of the comparison object.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE value_compare value_comp() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
value_compare value_comp() const
|
||||
{ return value_compare(dtl::force_copy<key_compare>(m_flat_tree.key_comp())); }
|
||||
|
||||
//////////////////////////////////////////////
|
||||
@@ -1307,14 +1332,16 @@ class flat_map
|
||||
//! equivalent to x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
BOOST_CONTAINER_FORCEINLINE iterator find(const key_type& x)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator find(const key_type& x)
|
||||
{ return dtl::force_copy<iterator>(m_flat_tree.find(x)); }
|
||||
|
||||
//! <b>Returns</b>: A const_iterator pointing to an element with the key
|
||||
//! equivalent to x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator find(const key_type& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator find(const key_type& x) const
|
||||
{ return dtl::force_copy<const_iterator>(m_flat_tree.find(x)); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
@@ -1325,7 +1352,8 @@ class flat_map
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE iterator find(const K& x)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator find(const K& x)
|
||||
{ return dtl::force_copy<iterator>(m_flat_tree.find(x)); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
@@ -1336,13 +1364,15 @@ class flat_map
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator find(const K& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator find(const K& x) const
|
||||
{ return dtl::force_copy<const_iterator>(m_flat_tree.find(x)); }
|
||||
|
||||
//! <b>Returns</b>: The number of elements with key equivalent to x.
|
||||
//!
|
||||
//! <b>Complexity</b>: log(size())+count(k)
|
||||
BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type count(const key_type& x) const
|
||||
{ return static_cast<size_type>(m_flat_tree.find(x) != m_flat_tree.end()); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
@@ -1352,7 +1382,8 @@ class flat_map
|
||||
//!
|
||||
//! <b>Complexity</b>: log(size())+count(k)
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE size_type count(const K& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type count(const K& x) const
|
||||
//Don't use find() != end optimization here as transparent comparators with key K might
|
||||
//return a different range than key_type (which can only return a single element range)
|
||||
{ return m_flat_tree.count(x); }
|
||||
@@ -1361,7 +1392,8 @@ class flat_map
|
||||
//! equivalent to key in the container, otherwise false.
|
||||
//!
|
||||
//! <b>Complexity</b>: log(size()).
|
||||
bool contains(const key_type& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
bool contains(const key_type& x) const
|
||||
{ return m_flat_tree.find(x) != m_flat_tree.end(); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
@@ -1372,21 +1404,24 @@ class flat_map
|
||||
//!
|
||||
//! <b>Complexity</b>: log(size()).
|
||||
template<typename K>
|
||||
bool contains(const K& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
bool contains(const K& x) const
|
||||
{ return m_flat_tree.find(x) != m_flat_tree.end(); }
|
||||
|
||||
//! <b>Returns</b>: An iterator pointing to the first element with key not less
|
||||
//! than x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const key_type& x)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator lower_bound(const key_type& x)
|
||||
{ return dtl::force_copy<iterator>(m_flat_tree.lower_bound(x)); }
|
||||
|
||||
//! <b>Returns</b>: A const iterator pointing to the first element with key not
|
||||
//! less than x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const key_type& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator lower_bound(const key_type& x) const
|
||||
{ return dtl::force_copy<const_iterator>(m_flat_tree.lower_bound(x)); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
@@ -1397,7 +1432,8 @@ class flat_map
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const K& x)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator lower_bound(const K& x)
|
||||
{ return dtl::force_copy<iterator>(m_flat_tree.lower_bound(x)); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
@@ -1408,21 +1444,24 @@ class flat_map
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const K& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator lower_bound(const K& x) const
|
||||
{ return dtl::force_copy<const_iterator>(m_flat_tree.lower_bound(x)); }
|
||||
|
||||
//! <b>Returns</b>: An iterator pointing to the first element with key greater
|
||||
//! than x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const key_type& x)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator upper_bound(const key_type& x)
|
||||
{ return dtl::force_copy<iterator>(m_flat_tree.upper_bound(x)); }
|
||||
|
||||
//! <b>Returns</b>: A const iterator pointing to the first element with key
|
||||
//! greater than x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const key_type& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator upper_bound(const key_type& x) const
|
||||
{ return dtl::force_copy<const_iterator>(m_flat_tree.upper_bound(x)); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
@@ -1433,7 +1472,8 @@ class flat_map
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const K& x)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator upper_bound(const K& x)
|
||||
{ return dtl::force_copy<iterator>(m_flat_tree.upper_bound(x)); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
@@ -1444,19 +1484,22 @@ class flat_map
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const K& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator upper_bound(const K& x) const
|
||||
{ return dtl::force_copy<const_iterator>(m_flat_tree.upper_bound(x)); }
|
||||
|
||||
//! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type& x)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
std::pair<iterator,iterator> equal_range(const key_type& x)
|
||||
{ return dtl::force_copy<std::pair<iterator,iterator> >(m_flat_tree.lower_bound_range(x)); }
|
||||
|
||||
//! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const
|
||||
{ return dtl::force_copy<std::pair<const_iterator,const_iterator> >(m_flat_tree.lower_bound_range(x)); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
@@ -1466,7 +1509,8 @@ class flat_map
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const K& x)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
std::pair<iterator,iterator> equal_range(const K& x)
|
||||
//Don't use lower_bound_range optimization here as transparent comparators with key K might
|
||||
//return a different range than key_type (which can only return a single element range)
|
||||
{ return dtl::force_copy<std::pair<iterator,iterator> >(m_flat_tree.equal_range(x)); }
|
||||
@@ -1478,7 +1522,8 @@ class flat_map
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const K& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
std::pair<const_iterator, const_iterator> equal_range(const K& x) const
|
||||
//Don't use lower_bound_range optimization here as transparent comparators with key K might
|
||||
//return a different range than key_type (which can only return a single element range)
|
||||
{ return dtl::force_copy<std::pair<const_iterator,const_iterator> >(m_flat_tree.equal_range(x)); }
|
||||
@@ -1490,7 +1535,7 @@ class flat_map
|
||||
//! <b>Postcondition</b>: this->empty()
|
||||
//!
|
||||
//! <b>Throws</b>: If secuence_type's move constructor throws
|
||||
BOOST_CONTAINER_FORCEINLINE sequence_type extract_sequence()
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE sequence_type extract_sequence()
|
||||
{
|
||||
return boost::move(dtl::force<sequence_type>(m_flat_tree.get_sequence_ref()));
|
||||
}
|
||||
@@ -1519,37 +1564,43 @@ class flat_map
|
||||
//! <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_FORCEINLINE friend bool operator==(const flat_map& x, const flat_map& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator==(const flat_map& x, const flat_map& 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_FORCEINLINE friend bool operator!=(const flat_map& x, const flat_map& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator!=(const flat_map& x, const flat_map& 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_FORCEINLINE friend bool operator<(const flat_map& x, const flat_map& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator<(const flat_map& x, const flat_map& 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_FORCEINLINE friend bool operator>(const flat_map& x, const flat_map& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator>(const flat_map& x, const flat_map& 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_FORCEINLINE friend bool operator<=(const flat_map& x, const flat_map& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator<=(const flat_map& x, const flat_map& 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_FORCEINLINE friend bool operator>=(const flat_map& x, const flat_map& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator>=(const flat_map& x, const flat_map& y)
|
||||
{ return !(x < y); }
|
||||
|
||||
//! <b>Effects</b>: x.swap(y)
|
||||
@@ -2095,7 +2146,7 @@ class flat_multimap
|
||||
//! was passed to the object's constructor.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<allocator_type>(m_flat_tree.get_allocator()); }
|
||||
|
||||
@@ -2106,7 +2157,7 @@ class flat_multimap
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force<stored_allocator_type>(m_flat_tree.get_stored_allocator()); }
|
||||
|
||||
@@ -2117,7 +2168,7 @@ class flat_multimap
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force<const stored_allocator_type>(m_flat_tree.get_stored_allocator()); }
|
||||
|
||||
@@ -2132,7 +2183,7 @@ class flat_multimap
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<iterator>(m_flat_tree.begin()); }
|
||||
|
||||
@@ -2141,7 +2192,7 @@ class flat_multimap
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<const_iterator>(m_flat_tree.begin()); }
|
||||
|
||||
@@ -2150,7 +2201,7 @@ class flat_multimap
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator end() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<iterator>(m_flat_tree.end()); }
|
||||
|
||||
@@ -2159,7 +2210,7 @@ class flat_multimap
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<const_iterator>(m_flat_tree.end()); }
|
||||
|
||||
@@ -2169,7 +2220,7 @@ class flat_multimap
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<reverse_iterator>(m_flat_tree.rbegin()); }
|
||||
|
||||
@@ -2179,7 +2230,7 @@ class flat_multimap
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<const_reverse_iterator>(m_flat_tree.rbegin()); }
|
||||
|
||||
@@ -2189,7 +2240,7 @@ class flat_multimap
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<reverse_iterator>(m_flat_tree.rend()); }
|
||||
|
||||
@@ -2199,7 +2250,7 @@ class flat_multimap
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<const_reverse_iterator>(m_flat_tree.rend()); }
|
||||
|
||||
@@ -2208,7 +2259,7 @@ class flat_multimap
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<const_iterator>(m_flat_tree.cbegin()); }
|
||||
|
||||
@@ -2217,7 +2268,7 @@ class flat_multimap
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<const_iterator>(m_flat_tree.cend()); }
|
||||
|
||||
@@ -2227,7 +2278,7 @@ class flat_multimap
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<const_reverse_iterator>(m_flat_tree.crbegin()); }
|
||||
|
||||
@@ -2237,7 +2288,7 @@ class flat_multimap
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<const_reverse_iterator>(m_flat_tree.crend()); }
|
||||
|
||||
@@ -2252,7 +2303,7 @@ class flat_multimap
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return m_flat_tree.empty(); }
|
||||
|
||||
@@ -2261,7 +2312,7 @@ class flat_multimap
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return m_flat_tree.size(); }
|
||||
|
||||
@@ -2270,7 +2321,7 @@ class flat_multimap
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return m_flat_tree.max_size(); }
|
||||
|
||||
@@ -2280,7 +2331,7 @@ class flat_multimap
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return m_flat_tree.capacity(); }
|
||||
|
||||
@@ -2309,22 +2360,22 @@ class flat_multimap
|
||||
{ m_flat_tree.shrink_to_fit(); }
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::nth(size_type)
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<iterator>(m_flat_tree.nth(n)); }
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::nth(size_type) const
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return dtl::force_copy<iterator>(m_flat_tree.nth(n)); }
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::index_of(iterator)
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return m_flat_tree.index_of(dtl::force_copy<impl_iterator>(p)); }
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::index_of(const_iterator) const
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return m_flat_tree.index_of(dtl::force_copy<impl_const_iterator>(p)); }
|
||||
|
||||
@@ -2627,14 +2678,16 @@ class flat_multimap
|
||||
//! of which a was constructed.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE key_compare key_comp() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
key_compare key_comp() const
|
||||
{ return dtl::force_copy<key_compare>(m_flat_tree.key_comp()); }
|
||||
|
||||
//! <b>Effects</b>: Returns an object of value_compare constructed out
|
||||
//! of the comparison object.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE value_compare value_comp() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
value_compare value_comp() const
|
||||
{ return value_compare(dtl::force_copy<key_compare>(m_flat_tree.key_comp())); }
|
||||
|
||||
//////////////////////////////////////////////
|
||||
@@ -2647,14 +2700,16 @@ class flat_multimap
|
||||
//! equivalent to x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
BOOST_CONTAINER_FORCEINLINE iterator find(const key_type& x)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator find(const key_type& x)
|
||||
{ return dtl::force_copy<iterator>(m_flat_tree.find(x)); }
|
||||
|
||||
//! <b>Returns</b>: An const_iterator pointing to an element with the key
|
||||
//! equivalent to x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator find(const key_type& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator find(const key_type& x) const
|
||||
{ return dtl::force_copy<const_iterator>(m_flat_tree.find(x)); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
@@ -2665,7 +2720,8 @@ class flat_multimap
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE iterator find(const K& x)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator find(const K& x)
|
||||
{ return dtl::force_copy<iterator>(m_flat_tree.find(x)); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
@@ -2676,13 +2732,15 @@ class flat_multimap
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator find(const K& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator find(const K& x) const
|
||||
{ return dtl::force_copy<const_iterator>(m_flat_tree.find(x)); }
|
||||
|
||||
//! <b>Returns</b>: The number of elements with key equivalent to x.
|
||||
//!
|
||||
//! <b>Complexity</b>: log(size())+count(k)
|
||||
BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type count(const key_type& x) const
|
||||
{ return m_flat_tree.count(x); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
@@ -2692,14 +2750,16 @@ class flat_multimap
|
||||
//!
|
||||
//! <b>Complexity</b>: log(size())+count(k)
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE size_type count(const K& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type count(const K& x) const
|
||||
{ return m_flat_tree.count(x); }
|
||||
|
||||
//! <b>Returns</b>: Returns true if there is an element with key
|
||||
//! equivalent to key in the container, otherwise false.
|
||||
//!
|
||||
//! <b>Complexity</b>: log(size()).
|
||||
bool contains(const key_type& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
bool contains(const key_type& x) const
|
||||
{ return m_flat_tree.find(x) != m_flat_tree.end(); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
@@ -2710,21 +2770,24 @@ class flat_multimap
|
||||
//!
|
||||
//! <b>Complexity</b>: log(size()).
|
||||
template<typename K>
|
||||
bool contains(const K& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
bool contains(const K& x) const
|
||||
{ return m_flat_tree.find(x) != m_flat_tree.end(); }
|
||||
|
||||
//! <b>Returns</b>: An iterator pointing to the first element with key not less
|
||||
//! than x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const key_type& x)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator lower_bound(const key_type& x)
|
||||
{ return dtl::force_copy<iterator>(m_flat_tree.lower_bound(x)); }
|
||||
|
||||
//! <b>Returns</b>: An iterator pointing to the first element with key not less
|
||||
//! than x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const key_type& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator lower_bound(const key_type& x) const
|
||||
{ return dtl::force_copy<const_iterator>(m_flat_tree.lower_bound(x)); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
@@ -2735,7 +2798,8 @@ class flat_multimap
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const K& x)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator lower_bound(const K& x)
|
||||
{ return dtl::force_copy<iterator>(m_flat_tree.lower_bound(x)); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
@@ -2746,21 +2810,24 @@ class flat_multimap
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const K& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator lower_bound(const K& x) const
|
||||
{ return dtl::force_copy<const_iterator>(m_flat_tree.lower_bound(x)); }
|
||||
|
||||
//! <b>Returns</b>: An iterator pointing to the first element with key greater
|
||||
//! than x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const key_type& x)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator upper_bound(const key_type& x)
|
||||
{return dtl::force_copy<iterator>(m_flat_tree.upper_bound(x)); }
|
||||
|
||||
//! <b>Returns</b>: A const iterator pointing to the first element with key
|
||||
//! greater than x, or end() if such an element is not found.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const key_type& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator upper_bound(const key_type& x) const
|
||||
{ return dtl::force_copy<const_iterator>(m_flat_tree.upper_bound(x)); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
@@ -2771,7 +2838,8 @@ class flat_multimap
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const K& x)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator upper_bound(const K& x)
|
||||
{return dtl::force_copy<iterator>(m_flat_tree.upper_bound(x)); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
@@ -2782,19 +2850,22 @@ class flat_multimap
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const K& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator upper_bound(const K& x) const
|
||||
{ return dtl::force_copy<const_iterator>(m_flat_tree.upper_bound(x)); }
|
||||
|
||||
//! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type& x)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
std::pair<iterator,iterator> equal_range(const key_type& x)
|
||||
{ return dtl::force_copy<std::pair<iterator,iterator> >(m_flat_tree.equal_range(x)); }
|
||||
|
||||
//! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const
|
||||
{ return dtl::force_copy<std::pair<const_iterator,const_iterator> >(m_flat_tree.equal_range(x)); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
@@ -2804,7 +2875,8 @@ class flat_multimap
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const K& x)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
std::pair<iterator,iterator> equal_range(const K& x)
|
||||
{ return dtl::force_copy<std::pair<iterator,iterator> >(m_flat_tree.equal_range(x)); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
@@ -2814,7 +2886,8 @@ class flat_multimap
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic
|
||||
template<class K>
|
||||
BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const K& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
std::pair<const_iterator, const_iterator> equal_range(const K& x) const
|
||||
{ return dtl::force_copy<std::pair<const_iterator,const_iterator> >(m_flat_tree.equal_range(x)); }
|
||||
|
||||
//! <b>Effects</b>: Extracts the internal sequence container.
|
||||
@@ -2824,7 +2897,8 @@ class flat_multimap
|
||||
//! <b>Postcondition</b>: this->empty()
|
||||
//!
|
||||
//! <b>Throws</b>: If secuence_type's move constructor throws
|
||||
BOOST_CONTAINER_FORCEINLINE sequence_type extract_sequence()
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
sequence_type extract_sequence()
|
||||
{
|
||||
return boost::move(dtl::force<sequence_type>(m_flat_tree.get_sequence_ref()));
|
||||
}
|
||||
@@ -2852,37 +2926,43 @@ class flat_multimap
|
||||
//! <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_FORCEINLINE friend bool operator==(const flat_multimap& x, const flat_multimap& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator==(const flat_multimap& x, const flat_multimap& 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_FORCEINLINE friend bool operator!=(const flat_multimap& x, const flat_multimap& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator!=(const flat_multimap& x, const flat_multimap& 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_FORCEINLINE friend bool operator<(const flat_multimap& x, const flat_multimap& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator<(const flat_multimap& x, const flat_multimap& 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_FORCEINLINE friend bool operator>(const flat_multimap& x, const flat_multimap& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator>(const flat_multimap& x, const flat_multimap& 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_FORCEINLINE friend bool operator<=(const flat_multimap& x, const flat_multimap& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator<=(const flat_multimap& x, const flat_multimap& 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_FORCEINLINE friend bool operator>=(const flat_multimap& x, const flat_multimap& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator>=(const flat_multimap& x, const flat_multimap& y)
|
||||
{ return !(x < y); }
|
||||
|
||||
//! <b>Effects</b>: x.swap(y)
|
||||
|
@@ -488,7 +488,8 @@ class list
|
||||
//! <b>Throws</b>: If allocator's copy constructor throws.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return allocator_type(this->node_alloc()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reference to the internal allocator.
|
||||
@@ -498,7 +499,8 @@ class list
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
BOOST_CONTAINER_FORCEINLINE stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->node_alloc(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reference to the internal allocator.
|
||||
@@ -508,7 +510,8 @@ class list
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
BOOST_CONTAINER_FORCEINLINE const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->node_alloc(); }
|
||||
|
||||
//////////////////////////////////////////////
|
||||
@@ -522,7 +525,8 @@ class list
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return iterator(this->icont().begin()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the first element contained in the list.
|
||||
@@ -530,7 +534,8 @@ class list
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->cbegin(); }
|
||||
|
||||
//! <b>Effects</b>: Returns an iterator to the end of the list.
|
||||
@@ -538,7 +543,8 @@ class list
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE iterator end() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator end() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return iterator(this->icont().end()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the end of the list.
|
||||
@@ -546,7 +552,8 @@ class list
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->cend(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
|
||||
@@ -555,7 +562,8 @@ class list
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return reverse_iterator(end()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
|
||||
@@ -564,7 +572,8 @@ class list
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->crbegin(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reverse_iterator pointing to the end
|
||||
@@ -573,7 +582,8 @@ class list
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return reverse_iterator(begin()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
|
||||
@@ -582,7 +592,8 @@ class list
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->crend(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the first element contained in the list.
|
||||
@@ -590,7 +601,8 @@ class list
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return const_iterator(this->non_const_icont().begin()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the end of the list.
|
||||
@@ -598,7 +610,8 @@ class list
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return const_iterator(this->non_const_icont().end()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
|
||||
@@ -607,7 +620,8 @@ class list
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return const_reverse_iterator(this->cend()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
|
||||
@@ -616,7 +630,8 @@ class list
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return const_reverse_iterator(this->cbegin()); }
|
||||
|
||||
//////////////////////////////////////////////
|
||||
@@ -630,7 +645,8 @@ class list
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return !this->size(); }
|
||||
|
||||
//! <b>Effects</b>: Returns the number of the elements contained in the list.
|
||||
@@ -638,7 +654,8 @@ class list
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->icont().size(); }
|
||||
|
||||
//! <b>Effects</b>: Returns the largest possible size of the list.
|
||||
@@ -646,7 +663,8 @@ class list
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return AllocHolder::max_size(); }
|
||||
|
||||
//! <b>Effects</b>: Inserts or erases elements at the end such that
|
||||
@@ -690,7 +708,8 @@ class list
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
reference front() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reference front() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(!this->empty());
|
||||
return *this->begin();
|
||||
@@ -704,7 +723,8 @@ class list
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(!this->empty());
|
||||
return *this->begin();
|
||||
@@ -718,7 +738,8 @@ class list
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
reference back() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reference back() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(!this->empty());
|
||||
return *(--this->end());
|
||||
@@ -732,7 +753,8 @@ class list
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(!this->empty());
|
||||
return *(--this->end());
|
||||
@@ -1374,43 +1396,49 @@ class list
|
||||
//! <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 list& x, const list& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator==(const list& x, const list& 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 list& x, const list& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator!=(const list& x, const list& 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 list& x, const list& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator<(const list& x, const list& 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 list& x, const list& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator>(const list& x, const list& 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 list& x, const list& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator<=(const list& x, const list& 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 list& x, const list& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator>=(const list& x, const list& y)
|
||||
{ return !(x < y); }
|
||||
|
||||
//! <b>Effects</b>: x.swap(y)
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
friend void swap(list& x, list& y)
|
||||
BOOST_CONTAINER_FORCEINLINE friend void swap(list& x, list& y)
|
||||
{ x.swap(y); }
|
||||
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
@@ -664,7 +664,7 @@ class map
|
||||
//! <b>Returns</b>: A reference to the element whose key is equivalent to x.
|
||||
//! Throws: An exception object of type out_of_range if no such element is present.
|
||||
//! <b>Complexity</b>: logarithmic.
|
||||
const T& at(const key_type& k) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD const T& at(const key_type& k) const
|
||||
{
|
||||
const_iterator i = this->find(k);
|
||||
if(i == this->end()){
|
||||
@@ -1120,7 +1120,8 @@ class map
|
||||
//! <b>Returns</b>: The number of elements with key equivalent to x.
|
||||
//!
|
||||
//! <b>Complexity</b>: log(size())+count(k)
|
||||
BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type count(const key_type& x) const
|
||||
{ return static_cast<size_type>(this->find(x) != this->cend()); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
@@ -1130,7 +1131,8 @@ class map
|
||||
//!
|
||||
//! <b>Complexity</b>: log(size())+count(k)
|
||||
template<typename K>
|
||||
BOOST_CONTAINER_FORCEINLINE size_type count(const K& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type count(const K& x) const
|
||||
{ return static_cast<size_type>(this->find(x) != this->cend()); }
|
||||
|
||||
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
@@ -774,7 +774,8 @@ class set
|
||||
//! <b>Returns</b>: The number of elements with key equivalent to x.
|
||||
//!
|
||||
//! <b>Complexity</b>: log(size())+count(k)
|
||||
BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type count(const key_type& x) const
|
||||
{ return static_cast<size_type>(this->base_t::find(x) != this->base_t::cend()); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
@@ -784,7 +785,8 @@ class set
|
||||
//!
|
||||
//! <b>Complexity</b>: log(size())+count(k)
|
||||
template<typename K>
|
||||
BOOST_CONTAINER_FORCEINLINE size_type count(const K& x) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type count(const K& x) const
|
||||
{ return static_cast<size_type>(this->find(x) != this->cend()); }
|
||||
|
||||
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
@@ -521,7 +521,8 @@ class slist
|
||||
//! <b>Throws</b>: If allocator's copy constructor throws.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return allocator_type(this->node_alloc()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reference to the internal allocator.
|
||||
@@ -531,7 +532,8 @@ class slist
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->node_alloc(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reference to the internal allocator.
|
||||
@@ -541,7 +543,8 @@ class slist
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->node_alloc(); }
|
||||
|
||||
//////////////////////////////////////////////
|
||||
@@ -557,7 +560,8 @@ class slist
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
iterator before_begin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator before_begin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return iterator(end()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a non-dereferenceable const_iterator
|
||||
@@ -567,7 +571,8 @@ class slist
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_iterator before_begin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator before_begin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->cbefore_begin(); }
|
||||
|
||||
//! <b>Effects</b>: Returns an iterator to the first element contained in the list.
|
||||
@@ -575,7 +580,8 @@ class slist
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return iterator(this->icont().begin()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the first element contained in the list.
|
||||
@@ -583,7 +589,8 @@ class slist
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->cbegin(); }
|
||||
|
||||
//! <b>Effects</b>: Returns an iterator to the end of the list.
|
||||
@@ -591,7 +598,8 @@ class slist
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
iterator end() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator end() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return iterator(this->icont().end()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the end of the list.
|
||||
@@ -599,7 +607,8 @@ class slist
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->cend(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a non-dereferenceable const_iterator
|
||||
@@ -609,7 +618,8 @@ class slist
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_iterator cbefore_begin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator cbefore_begin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return const_iterator(end()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the first element contained in the list.
|
||||
@@ -617,7 +627,8 @@ class slist
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return const_iterator(this->non_const_icont().begin()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the end of the list.
|
||||
@@ -625,7 +636,8 @@ class slist
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return const_iterator(this->non_const_icont().end()); }
|
||||
|
||||
//! <b>Returns</b>: The iterator to the element before i in the sequence.
|
||||
@@ -637,7 +649,8 @@ class slist
|
||||
//! <b>Complexity</b>: Linear to the number of elements before i.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
iterator previous(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator previous(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return iterator(this->icont().previous(p.get())); }
|
||||
|
||||
//! <b>Returns</b>: The const_iterator to the element before i in the sequence.
|
||||
@@ -649,7 +662,8 @@ class slist
|
||||
//! <b>Complexity</b>: Linear to the number of elements before i.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
const_iterator previous(const_iterator p)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator previous(const_iterator p)
|
||||
{ return const_iterator(this->icont().previous(p.get())); }
|
||||
|
||||
//////////////////////////////////////////////
|
||||
@@ -663,7 +677,8 @@ class slist
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
bool empty() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
bool empty() const
|
||||
{ return !this->size(); }
|
||||
|
||||
//! <b>Effects</b>: Returns the number of the elements contained in the list.
|
||||
@@ -671,7 +686,8 @@ class slist
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
size_type size() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type size() const
|
||||
{ return this->icont().size(); }
|
||||
|
||||
//! <b>Effects</b>: Returns the largest possible size of the list.
|
||||
@@ -679,7 +695,8 @@ class slist
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
size_type max_size() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type max_size() const
|
||||
{ return AllocHolder::max_size(); }
|
||||
|
||||
//! <b>Effects</b>: Inserts or erases elements at the end such that
|
||||
@@ -725,7 +742,8 @@ class slist
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
reference front()
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reference front()
|
||||
{
|
||||
BOOST_ASSERT(!this->empty());
|
||||
return *this->begin();
|
||||
@@ -739,7 +757,8 @@ class slist
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_reference front() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reference front() const
|
||||
{
|
||||
BOOST_ASSERT(!this->empty());
|
||||
return *this->begin();
|
||||
@@ -1574,31 +1593,36 @@ class slist
|
||||
//! <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 slist& x, const slist& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator!=(const slist& x, const slist& 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 slist& x, const slist& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator<(const slist& x, const slist& 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 slist& x, const slist& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator>(const slist& x, const slist& 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 slist& x, const slist& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator<=(const slist& x, const slist& 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 slist& x, const slist& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator>=(const slist& x, const slist& y)
|
||||
{ return !(x < y); }
|
||||
|
||||
//! <b>Effects</b>: x.swap(y)
|
||||
|
@@ -344,15 +344,18 @@ class stable_vector_iterator
|
||||
BOOST_CONTAINER_FORCEINLINE stable_vector_iterator & operator=(const stable_vector_iterator& other) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ m_pn = other.node_pointer(); return *this; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE node_ptr node_pointer() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
node_ptr node_pointer() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return node_ptr_traits::static_cast_from(m_pn); }
|
||||
|
||||
public:
|
||||
//Pointer like operators
|
||||
BOOST_CONTAINER_FORCEINLINE reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return node_pointer()->get_data(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return ptr_traits::pointer_to(this->operator*()); }
|
||||
|
||||
//Increment / Decrement
|
||||
@@ -376,7 +379,8 @@ class stable_vector_iterator
|
||||
BOOST_CONTAINER_FORCEINLINE stable_vector_iterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ stable_vector_iterator tmp(*this); --*this; return stable_vector_iterator(tmp); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE reference operator[](difference_type off) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reference operator[](difference_type off) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return node_ptr_traits::static_cast_from(this->m_pn->up[off])->get_data(); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE stable_vector_iterator& operator+=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
@@ -385,14 +389,16 @@ class stable_vector_iterator
|
||||
return *this;
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend stable_vector_iterator operator+(const stable_vector_iterator &left, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend stable_vector_iterator operator+(const stable_vector_iterator &left, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
stable_vector_iterator tmp(left);
|
||||
tmp += off;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend stable_vector_iterator operator+(difference_type off, const stable_vector_iterator& right) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend stable_vector_iterator operator+(difference_type off, const stable_vector_iterator& right) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
stable_vector_iterator tmp(right);
|
||||
tmp += off;
|
||||
@@ -402,33 +408,41 @@ class stable_vector_iterator
|
||||
BOOST_CONTAINER_FORCEINLINE stable_vector_iterator& operator-=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ *this += -off; return *this; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend stable_vector_iterator operator-(const stable_vector_iterator &left, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend stable_vector_iterator operator-(const stable_vector_iterator &left, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
stable_vector_iterator tmp(left);
|
||||
tmp -= off;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend difference_type operator-(const stable_vector_iterator &left, const stable_vector_iterator &right) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
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_FORCEINLINE friend bool operator== (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
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_FORCEINLINE friend bool operator!= (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
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_FORCEINLINE friend bool operator< (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
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_FORCEINLINE friend bool operator<= (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
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_FORCEINLINE friend bool operator> (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
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_FORCEINLINE friend bool operator>= (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
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; }
|
||||
};
|
||||
|
||||
@@ -951,7 +965,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: If allocator's copy constructor throws.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE allocator_type get_allocator() const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
allocator_type get_allocator() const
|
||||
{ return this->priv_node_alloc(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reference to the internal allocator.
|
||||
@@ -961,7 +976,8 @@ class stable_vector
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
BOOST_CONTAINER_FORCEINLINE const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->priv_node_alloc(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reference to the internal allocator.
|
||||
@@ -971,7 +987,8 @@ class stable_vector
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
BOOST_CONTAINER_FORCEINLINE stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->priv_node_alloc(); }
|
||||
|
||||
//////////////////////////////////////////////
|
||||
@@ -985,7 +1002,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return (this->index.empty()) ? this->end(): iterator(node_ptr_traits::static_cast_from(this->index.front())); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the first element contained in the stable_vector.
|
||||
@@ -993,7 +1011,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
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())) ; }
|
||||
|
||||
//! <b>Effects</b>: Returns an iterator to the end of the stable_vector.
|
||||
@@ -1001,7 +1020,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE iterator end() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator end() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return iterator(this->priv_get_end_node()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the end of the stable_vector.
|
||||
@@ -1009,7 +1029,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return const_iterator(this->priv_get_end_node()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
|
||||
@@ -1018,7 +1039,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return reverse_iterator(this->end()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
|
||||
@@ -1027,7 +1049,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return const_reverse_iterator(this->end()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reverse_iterator pointing to the end
|
||||
@@ -1036,7 +1059,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return reverse_iterator(this->begin()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
|
||||
@@ -1045,7 +1069,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return const_reverse_iterator(this->begin()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the first element contained in the stable_vector.
|
||||
@@ -1053,7 +1078,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->begin(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the end of the stable_vector.
|
||||
@@ -1061,7 +1087,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->end(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
|
||||
@@ -1070,7 +1097,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->rbegin(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
|
||||
@@ -1079,7 +1107,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend()const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator crend()const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->rend(); }
|
||||
|
||||
//////////////////////////////////////////////
|
||||
@@ -1093,7 +1122,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->index.size() <= ExtraPointers; }
|
||||
|
||||
//! <b>Effects</b>: Returns the number of the elements contained in the stable_vector.
|
||||
@@ -1101,7 +1131,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
const size_type index_size = this->index.size();
|
||||
return (index_size - ExtraPointers) & (size_type(0u) -size_type(index_size != 0));
|
||||
@@ -1112,7 +1143,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->index.max_size() - ExtraPointers; }
|
||||
|
||||
//! <b>Effects</b>: Inserts or erases elements at the end such that
|
||||
@@ -1170,7 +1202,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
const size_type index_size = this->index.size();
|
||||
BOOST_ASSERT(!index_size || index_size >= ExtraPointers);
|
||||
@@ -1257,7 +1290,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE reference front() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reference front() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(!this->empty());
|
||||
return static_cast<node_reference>(*this->index.front()).get_data();
|
||||
@@ -1271,7 +1305,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(!this->empty());
|
||||
return static_cast<const_node_reference>(*this->index.front()).get_data();
|
||||
@@ -1285,7 +1320,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE reference back() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reference back() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(!this->empty());
|
||||
return static_cast<node_reference>(*this->index[this->size()-1u]).get_data();
|
||||
@@ -1299,7 +1335,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(!this->empty());
|
||||
return static_cast<const_node_reference>(*this->index[this->size()-1u]).get_data();
|
||||
@@ -1313,7 +1350,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(this->size() > n);
|
||||
return static_cast<node_reference>(*this->index[n]).get_data();
|
||||
@@ -1327,7 +1365,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(this->size() > n);
|
||||
return static_cast<const_node_reference>(*this->index[n]).get_data();
|
||||
@@ -1344,7 +1383,8 @@ class stable_vector
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension
|
||||
BOOST_CONTAINER_FORCEINLINE iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(this->size() >= n);
|
||||
return (this->index.empty()) ? this->end() : iterator(node_ptr_traits::static_cast_from(this->index[n]));
|
||||
@@ -1361,7 +1401,8 @@ class stable_vector
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(this->size() >= n);
|
||||
return (this->index.empty()) ? this->cend() : iterator(node_ptr_traits::static_cast_from(this->index[n]));
|
||||
@@ -1377,7 +1418,8 @@ class stable_vector
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension
|
||||
BOOST_CONTAINER_FORCEINLINE size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->priv_index_of(p.node_pointer()); }
|
||||
|
||||
//! <b>Requires</b>: begin() <= p <= end().
|
||||
@@ -1390,7 +1432,8 @@ class stable_vector
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension
|
||||
BOOST_CONTAINER_FORCEINLINE size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->priv_index_of(p.node_pointer()); }
|
||||
|
||||
//! <b>Requires</b>: size() > n.
|
||||
@@ -1401,7 +1444,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: std::range_error if n >= size()
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
reference at(size_type n)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reference at(size_type n)
|
||||
{
|
||||
if(n >= this->size()){
|
||||
throw_out_of_range("vector::at invalid subscript");
|
||||
@@ -1417,7 +1461,8 @@ class stable_vector
|
||||
//! <b>Throws</b>: std::range_error if n >= size()
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_reference at(size_type n)const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reference at(size_type n)const
|
||||
{
|
||||
if(n >= this->size()){
|
||||
throw_out_of_range("vector::at invalid subscript");
|
||||
@@ -1752,37 +1797,43 @@ class stable_vector
|
||||
//! <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_FORCEINLINE friend bool operator==(const stable_vector& x, const stable_vector& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
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_FORCEINLINE friend bool operator!=(const stable_vector& x, const stable_vector& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
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_FORCEINLINE friend bool operator<(const stable_vector& x, const stable_vector& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
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_FORCEINLINE friend bool operator>(const stable_vector& x, const stable_vector& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
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_FORCEINLINE friend bool operator<=(const stable_vector& x, const stable_vector& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
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_FORCEINLINE friend bool operator>=(const stable_vector& x, const stable_vector& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator>=(const stable_vector& x, const stable_vector& y)
|
||||
{ return !(x < y); }
|
||||
|
||||
//! <b>Effects</b>: x.swap(y)
|
||||
|
@@ -951,7 +951,8 @@ class basic_string
|
||||
//! <b>Throws</b>: If allocator's copy constructor throws.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->alloc(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reference to the internal allocator.
|
||||
@@ -961,7 +962,8 @@ class basic_string
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->alloc(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reference to the internal allocator.
|
||||
@@ -971,7 +973,8 @@ class basic_string
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->alloc(); }
|
||||
|
||||
//////////////////////////////////////////////
|
||||
@@ -985,7 +988,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->priv_addr(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the first element contained in the vector.
|
||||
@@ -993,7 +997,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->priv_addr(); }
|
||||
|
||||
//! <b>Effects</b>: Returns an iterator to the end of the vector.
|
||||
@@ -1001,7 +1006,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
iterator end() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator end() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->priv_end_addr(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the end of the vector.
|
||||
@@ -1009,7 +1015,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->priv_end_addr(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
|
||||
@@ -1018,7 +1025,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return reverse_iterator(this->priv_end_addr()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
|
||||
@@ -1027,7 +1035,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->crbegin(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reverse_iterator pointing to the end
|
||||
@@ -1036,7 +1045,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return reverse_iterator(this->priv_addr()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
|
||||
@@ -1045,7 +1055,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->crend(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the first element contained in the vector.
|
||||
@@ -1053,7 +1064,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->priv_addr(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the end of the vector.
|
||||
@@ -1061,7 +1073,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->priv_end_addr(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
|
||||
@@ -1070,7 +1083,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return const_reverse_iterator(this->priv_end_addr()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
|
||||
@@ -1079,7 +1093,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return const_reverse_iterator(this->priv_addr()); }
|
||||
|
||||
//////////////////////////////////////////////
|
||||
@@ -1093,7 +1108,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return !this->priv_size(); }
|
||||
|
||||
//! <b>Effects</b>: Returns the number of the elements contained in the vector.
|
||||
@@ -1101,7 +1117,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->priv_size(); }
|
||||
|
||||
//! <b>Effects</b>: Returns the number of the elements contained in the vector.
|
||||
@@ -1109,15 +1126,17 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
size_type length() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type length() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->size(); }
|
||||
|
||||
//! <b>Effects</b>: Returns the largest possible size of the vector.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
//! <b>Complexity</b>: Constant
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return base_t::max_size(); }
|
||||
|
||||
//! <b>Effects</b>: Inserts or erases elements at the end such that
|
||||
@@ -1143,7 +1162,6 @@ class basic_string
|
||||
void resize(size_type n)
|
||||
{ resize(n, CharT()); }
|
||||
|
||||
|
||||
//! <b>Effects</b>: Inserts or erases elements at the end such that
|
||||
//! the size becomes n. New elements are uninitialized.
|
||||
//!
|
||||
@@ -1169,7 +1187,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->priv_capacity(); }
|
||||
|
||||
//! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
|
||||
@@ -1228,7 +1247,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
reference front() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reference front() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(!this->empty());
|
||||
return *this->priv_addr();
|
||||
@@ -1242,7 +1262,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(!this->empty());
|
||||
return *this->priv_addr();
|
||||
@@ -1256,7 +1277,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
reference back() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reference back() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(!this->empty());
|
||||
return *(this->priv_addr() + (this->size() - 1u) );
|
||||
@@ -1270,7 +1292,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(!this->empty());
|
||||
return *(this->priv_addr() + (this->size() - 1u) );
|
||||
@@ -1284,7 +1307,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(this->size() > n);
|
||||
return *(this->priv_addr() + n);
|
||||
@@ -1298,7 +1322,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(this->size() > n);
|
||||
return *(this->priv_addr() + n);
|
||||
@@ -1312,7 +1337,8 @@ class basic_string
|
||||
//! <b>Throws</b>: std::range_error if n >= size()
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
reference at(size_type n)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reference at(size_type n)
|
||||
{
|
||||
if (n >= this->size())
|
||||
throw_out_of_range("basic_string::at invalid subscript");
|
||||
@@ -1327,7 +1353,8 @@ class basic_string
|
||||
//! <b>Throws</b>: std::range_error if n >= size()
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_reference at(size_type n) const {
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reference at(size_type n) const {
|
||||
if (n >= this->size())
|
||||
throw_out_of_range("basic_string::at invalid subscript");
|
||||
return *(this->priv_addr() + n);
|
||||
@@ -2237,7 +2264,8 @@ class basic_string
|
||||
//! <b>Returns</b>: A pointer p such that p + i == &operator[](i) for each i in [0,size()].
|
||||
//!
|
||||
//! <b>Complexity</b>: constant time.
|
||||
const CharT* c_str() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const CharT* c_str() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return boost::movelib::to_raw_pointer(this->priv_addr()); }
|
||||
|
||||
//! <b>Requires</b>: The program shall not alter any of the values stored in the character array.
|
||||
@@ -2245,13 +2273,15 @@ class basic_string
|
||||
//! <b>Returns</b>: A pointer p such that p + i == &operator[](i) for each i in [0,size()].
|
||||
//!
|
||||
//! <b>Complexity</b>: constant time.
|
||||
const CharT* data() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const CharT* data() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return boost::movelib::to_raw_pointer(this->priv_addr()); }
|
||||
|
||||
//! <b>Returns</b>: A pointer p such that p + i == &operator[](i) for each i in [0,size()].
|
||||
//!
|
||||
//! <b>Complexity</b>: constant time.
|
||||
CharT* data() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
CharT* data() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return boost::movelib::to_raw_pointer(this->priv_addr()); }
|
||||
|
||||
#ifndef BOOST_CONTAINER_TEMPLATED_CONVERSION_OPERATOR_BROKEN
|
||||
@@ -2270,7 +2300,8 @@ class basic_string
|
||||
//! <b>Note</b>: This function is available to write portable code for compilers
|
||||
//! that don't support templated conversion operators.
|
||||
template<class BasicStringView>
|
||||
BasicStringView to_view() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
BasicStringView to_view() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return BasicStringView(this->data(), this->size()); }
|
||||
|
||||
//////////////////////////////////////////////
|
||||
@@ -2287,7 +2318,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
|
||||
size_type find(const basic_string& s, size_type pos = 0) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find(const basic_string& s, size_type pos = 0) const
|
||||
{ return find(s.c_str(), pos, s.size()); }
|
||||
|
||||
//! <b>Effects</b>: Determines the lowest position xpos, if possible, such that both
|
||||
@@ -2299,7 +2331,8 @@ class basic_string
|
||||
//!
|
||||
//! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
|
||||
template<template <class, class> class BasicStringView>
|
||||
size_type find(BasicStringView<CharT, Traits> sv, size_type pos = 0) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find(BasicStringView<CharT, Traits> sv, size_type pos = 0) const
|
||||
{ return find(sv.data(), pos, sv.size()); }
|
||||
|
||||
//! <b>Requires</b>: s points to an array of at least n elements of CharT.
|
||||
@@ -2307,7 +2340,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: find(basic_string<CharT,traits,allocator_type>(s,n),pos).
|
||||
size_type find(const CharT* s, size_type pos, size_type n) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find(const CharT* s, size_type pos, size_type n) const
|
||||
{
|
||||
if (pos + n > this->size())
|
||||
return npos;
|
||||
@@ -2327,13 +2361,15 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: find(basic_string(s), pos).
|
||||
size_type find(const CharT* s, size_type pos = 0) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find(const CharT* s, size_type pos = 0) const
|
||||
{ return this->find(s, pos, Traits::length(s)); }
|
||||
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: find(basic_string<CharT,traits,allocator_type>(1,c), pos).
|
||||
size_type find(CharT c, size_type pos = 0) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find(CharT c, size_type pos = 0) const
|
||||
{
|
||||
const size_type sz = this->size();
|
||||
if (pos >= sz)
|
||||
@@ -2356,7 +2392,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
|
||||
size_type rfind(const basic_string& str, size_type pos = npos) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type rfind(const basic_string& str, size_type pos = npos) const
|
||||
{ return rfind(str.c_str(), pos, str.size()); }
|
||||
|
||||
//! <b>Effects</b>: Determines the highest position xpos, if possible, such
|
||||
@@ -2368,7 +2405,8 @@ class basic_string
|
||||
//!
|
||||
//! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
|
||||
template<template <class, class> class BasicStringView>
|
||||
size_type rfind(BasicStringView<CharT, Traits> sv, size_type pos = npos) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type rfind(BasicStringView<CharT, Traits> sv, size_type pos = npos) const
|
||||
{ return rfind(sv.data(), pos, sv.size()); }
|
||||
|
||||
//! <b>Requires</b>: s points to an array of at least n elements of CharT.
|
||||
@@ -2376,7 +2414,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: rfind(basic_string(s, n), pos).
|
||||
size_type rfind(const CharT* s, size_type pos, size_type n) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type rfind(const CharT* s, size_type pos, size_type n) const
|
||||
{
|
||||
const size_type len = this->size();
|
||||
|
||||
@@ -2399,13 +2438,15 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: rfind(basic_string(s), pos).
|
||||
size_type rfind(const CharT* s, size_type pos = npos) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type rfind(const CharT* s, size_type pos = npos) const
|
||||
{ return rfind(s, pos, Traits::length(s)); }
|
||||
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: rfind(basic_string<CharT,traits,allocator_type>(1,c),pos).
|
||||
size_type rfind(CharT c, size_type pos = npos) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type rfind(CharT c, size_type pos = npos) const
|
||||
{
|
||||
const size_type len = this->size();
|
||||
|
||||
@@ -2427,7 +2468,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
|
||||
size_type find_first_of(const basic_string& str, size_type pos = 0) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find_first_of(const basic_string& str, size_type pos = 0) const
|
||||
{ return this->find_first_of(str.c_str(), pos, str.size()); }
|
||||
|
||||
//! <b>Effects</b>: Determines the lowest position xpos, if possible, such that both of the
|
||||
@@ -2438,7 +2480,8 @@ class basic_string
|
||||
//!
|
||||
//! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
|
||||
template<template <class, class> class BasicStringView>
|
||||
size_type find_first_of(BasicStringView<CharT, Traits> sv, size_type pos = 0) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find_first_of(BasicStringView<CharT, Traits> sv, size_type pos = 0) const
|
||||
{ return this->find_first_of(sv.data(), pos, sv.size()); }
|
||||
|
||||
//! <b>Requires</b>: s points to an array of at least n elements of CharT.
|
||||
@@ -2446,7 +2489,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: find_first_of(basic_string(s, n), pos).
|
||||
size_type find_first_of(const CharT* s, size_type pos, size_type n) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find_first_of(const CharT* s, size_type pos, size_type n) const
|
||||
{
|
||||
const size_type sz = this->size();
|
||||
if (pos >= sz)
|
||||
@@ -2465,7 +2509,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: find_first_of(basic_string(s), pos).
|
||||
size_type find_first_of(const CharT* s, size_type pos = 0) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find_first_of(const CharT* s, size_type pos = 0) const
|
||||
{ return this->find_first_of(s, pos, Traits::length(s)); }
|
||||
|
||||
//! <b>Requires</b>: s points to an array of at least traits::length(s) + 1 elements of CharT.
|
||||
@@ -2473,7 +2518,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: find_first_of(basic_string<CharT,traits,allocator_type>(1,c), pos).
|
||||
size_type find_first_of(CharT c, size_type pos = 0) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find_first_of(CharT c, size_type pos = 0) const
|
||||
{ return this->find(c, pos); }
|
||||
|
||||
//! <b>Effects</b>: Determines the highest position xpos, if possible, such that both of
|
||||
@@ -2483,7 +2529,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
|
||||
size_type find_last_of(const basic_string& str, size_type pos = npos) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find_last_of(const basic_string& str, size_type pos = npos) const
|
||||
{ return this->find_last_of(str.c_str(), pos, str.size()); }
|
||||
|
||||
//! <b>Effects</b>: Determines the highest position xpos, if possible, such that both of
|
||||
@@ -2494,7 +2541,8 @@ class basic_string
|
||||
//!
|
||||
//! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
|
||||
template<template <class, class> class BasicStringView>
|
||||
size_type find_last_of(BasicStringView<CharT, Traits> sv, size_type pos = npos) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find_last_of(BasicStringView<CharT, Traits> sv, size_type pos = npos) const
|
||||
{ return this->find_last_of(sv.data(), pos, sv.size()); }
|
||||
|
||||
//! <b>Requires</b>: s points to an array of at least n elements of CharT.
|
||||
@@ -2502,7 +2550,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: find_last_of(basic_string(s, n), pos).
|
||||
size_type find_last_of(const CharT* s, size_type pos, size_type n) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find_last_of(const CharT* s, size_type pos, size_type n) const
|
||||
{
|
||||
const size_type len = this->size();
|
||||
|
||||
@@ -2523,13 +2572,15 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: find_last_of(basic_string<CharT,traits,allocator_type>(1,c),pos).
|
||||
size_type find_last_of(const CharT* s, size_type pos = npos) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find_last_of(const CharT* s, size_type pos = npos) const
|
||||
{ return find_last_of(s, pos, Traits::length(s)); }
|
||||
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: find_last_of(basic_string(s), pos).
|
||||
size_type find_last_of(CharT c, size_type pos = npos) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find_last_of(CharT c, size_type pos = npos) const
|
||||
{ return rfind(c, pos); }
|
||||
|
||||
//! <b>Effects</b>: Determines the lowest position xpos, if possible, such that
|
||||
@@ -2540,7 +2591,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
|
||||
size_type find_first_not_of(const basic_string& str, size_type pos = 0) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find_first_not_of(const basic_string& str, size_type pos = 0) const
|
||||
{ return find_first_not_of(str.c_str(), pos, str.size()); }
|
||||
|
||||
//! <b>Effects</b>: Determines the lowest position xpos, if possible, such that
|
||||
@@ -2552,7 +2604,8 @@ class basic_string
|
||||
//!
|
||||
//! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
|
||||
template<template <class, class> class BasicStringView>
|
||||
size_type find_first_not_of(BasicStringView<CharT, Traits> sv, size_type pos = 0) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find_first_not_of(BasicStringView<CharT, Traits> sv, size_type pos = 0) const
|
||||
{ return find_first_not_of(sv.data(), pos, sv.size()); }
|
||||
|
||||
//! <b>Requires</b>: s points to an array of at least traits::length(s) + 1 elements of CharT.
|
||||
@@ -2560,7 +2613,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: find_first_not_of(basic_string(s, n), pos).
|
||||
size_type find_first_not_of(const CharT* s, size_type pos, size_type n) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find_first_not_of(const CharT* s, size_type pos, size_type n) const
|
||||
{
|
||||
if (pos > this->size())
|
||||
return npos;
|
||||
@@ -2578,13 +2632,15 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: find_first_not_of(basic_string(s), pos).
|
||||
size_type find_first_not_of(const CharT* s, size_type pos = 0) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find_first_not_of(const CharT* s, size_type pos = 0) const
|
||||
{ return find_first_not_of(s, pos, Traits::length(s)); }
|
||||
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: find_first_not_of(basic_string(1, c), pos).
|
||||
size_type find_first_not_of(CharT c, size_type pos = 0) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find_first_not_of(CharT c, size_type pos = 0) const
|
||||
{
|
||||
if (pos > this->size())
|
||||
return npos;
|
||||
@@ -2605,7 +2661,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
|
||||
size_type find_last_not_of(const basic_string& str, size_type pos = npos) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find_last_not_of(const basic_string& str, size_type pos = npos) const
|
||||
{ return find_last_not_of(str.c_str(), pos, str.size()); }
|
||||
|
||||
//! <b>Effects</b>: Determines the highest position xpos, if possible, such that
|
||||
@@ -2616,7 +2673,8 @@ class basic_string
|
||||
//!
|
||||
//! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
|
||||
template<template <class, class> class BasicStringView>
|
||||
size_type find_last_not_of(BasicStringView<CharT, Traits> sv, size_type pos = npos) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find_last_not_of(BasicStringView<CharT, Traits> sv, size_type pos = npos) const
|
||||
{ return find_last_not_of(sv.data(), pos, sv.size()); }
|
||||
|
||||
//! <b>Requires</b>: s points to an array of at least n elements of CharT.
|
||||
@@ -2624,7 +2682,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: find_last_not_of(basic_string(s, n), pos).
|
||||
size_type find_last_not_of(const CharT* s, size_type pos, size_type n) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find_last_not_of(const CharT* s, size_type pos, size_type n) const
|
||||
{
|
||||
const size_type len = this->size();
|
||||
|
||||
@@ -2644,13 +2703,15 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: find_last_not_of(basic_string(s), pos).
|
||||
size_type find_last_not_of(const CharT* s, size_type pos = npos) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find_last_not_of(const CharT* s, size_type pos = npos) const
|
||||
{ return find_last_not_of(s, pos, Traits::length(s)); }
|
||||
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: find_last_not_of(basic_string(1, c), pos).
|
||||
size_type find_last_not_of(CharT c, size_type pos = npos) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type find_last_not_of(CharT c, size_type pos = npos) const
|
||||
{
|
||||
const size_type len = this->size();
|
||||
|
||||
@@ -2673,7 +2734,8 @@ class basic_string
|
||||
//! <b>Throws</b>: If memory allocation throws or out_of_range if pos > size().
|
||||
//!
|
||||
//! <b>Returns</b>: basic_string<CharT,traits,allocator_type>(data()+pos,rlen).
|
||||
basic_string substr(size_type pos = 0, size_type n = npos) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
basic_string substr(size_type pos = 0, size_type n = npos) const
|
||||
{
|
||||
if (pos > this->size())
|
||||
throw_out_of_range("basic_string::substr out of range position");
|
||||
@@ -2691,7 +2753,8 @@ class basic_string
|
||||
//! <b>Returns</b>: The nonzero result if the result of the comparison is nonzero.
|
||||
//! Otherwise, returns a value < 0 if size() < str.size(), a 0 value if size() == str.size(),
|
||||
//! and value > 0 if size() > str.size()
|
||||
int compare(const basic_string& str) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
int compare(const basic_string& str) const
|
||||
{
|
||||
const pointer addr = this->priv_addr();
|
||||
const pointer str_addr = str.priv_addr();
|
||||
@@ -2702,7 +2765,8 @@ class basic_string
|
||||
//!
|
||||
//! <b>Returns</b>: compare(basic_string(sv)).
|
||||
template<template <class, class> class BasicStringView>
|
||||
int compare(BasicStringView<CharT,Traits> sv) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
int compare(BasicStringView<CharT,Traits> sv) const
|
||||
{
|
||||
const pointer addr = this->priv_addr();
|
||||
return s_compare(addr, addr + this->priv_size(), sv.data(), sv.data() + sv.size());
|
||||
@@ -2717,7 +2781,8 @@ class basic_string
|
||||
//! <b>Throws</b>: out_of_range if pos1 > size()
|
||||
//!
|
||||
//! <b>Returns</b>:basic_string(*this,pos1,n1).compare(str).
|
||||
int compare(size_type pos1, size_type n1, const basic_string& str) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
int compare(size_type pos1, size_type n1, const basic_string& str) const
|
||||
{
|
||||
if (pos1 > this->size())
|
||||
throw_out_of_range("basic_string::compare out of range position");
|
||||
@@ -2734,7 +2799,8 @@ class basic_string
|
||||
//!
|
||||
//! <b>Returns</b>:basic_string(*this,pos1,n1).compare(sv).
|
||||
template<template <class, class> class BasicStringView>
|
||||
int compare(size_type pos1, size_type n1, BasicStringView<CharT,Traits> sv) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
int compare(size_type pos1, size_type n1, BasicStringView<CharT,Traits> sv) const
|
||||
{
|
||||
if (pos1 > this->size())
|
||||
throw_out_of_range("basic_string::compare out of range position");
|
||||
@@ -2752,7 +2818,8 @@ class basic_string
|
||||
//! <b>Throws</b>: out_of_range if pos1 > size() or pos2 > str.size()
|
||||
//!
|
||||
//! <b>Returns</b>: basic_string(*this, pos1, n1).compare(basic_string(str, pos2, n2)).
|
||||
int compare(size_type pos1, size_type n1, const basic_string& str, size_type pos2, size_type n2 = npos) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
int compare(size_type pos1, size_type n1, const basic_string& str, size_type pos2, size_type n2 = npos) const
|
||||
{
|
||||
if (pos1 > this->size() || pos2 > str.size())
|
||||
throw_out_of_range("basic_string::compare out of range position");
|
||||
@@ -2771,7 +2838,8 @@ class basic_string
|
||||
//!
|
||||
//! <b>Returns</b>: basic_string(*this, pos1, n1).compare(BasicStringView<CharT, Traits>(sv, pos2, n2)).
|
||||
template<template <class, class> class BasicStringView>
|
||||
int compare(size_type pos1, size_type n1, BasicStringView<CharT,Traits> sv, size_type pos2, size_type n2) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
int compare(size_type pos1, size_type n1, BasicStringView<CharT,Traits> sv, size_type pos2, size_type n2) const
|
||||
{
|
||||
if (pos1 > this->size() || pos2 > sv.size())
|
||||
throw_out_of_range("basic_string::compare out of range position");
|
||||
@@ -2784,7 +2852,8 @@ class basic_string
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
//! <b>Returns</b>: compare(basic_string(s)).
|
||||
int compare(const CharT* s) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
int compare(const CharT* s) const
|
||||
{
|
||||
const pointer addr = this->priv_addr();
|
||||
return s_compare(addr, addr + this->priv_size(), s, s + Traits::length(s));
|
||||
@@ -2795,7 +2864,8 @@ class basic_string
|
||||
//! <b>Throws</b>: out_of_range if pos1 > size()
|
||||
//!
|
||||
//! <b>Returns</b>: basic_string(*this, pos, n1).compare(basic_string(s, n2)).
|
||||
int compare(size_type pos1, size_type n1, const CharT* s, size_type n2) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
int compare(size_type pos1, size_type n1, const CharT* s, size_type n2) const
|
||||
{
|
||||
if (pos1 > this->size())
|
||||
throw_out_of_range("basic_string::compare out of range position");
|
||||
@@ -2810,7 +2880,8 @@ class basic_string
|
||||
//! <b>Throws</b>: out_of_range if pos1 > size()
|
||||
//!
|
||||
//! <b>Returns</b>: basic_string(*this, pos, n1).compare(basic_string(s, n2)).
|
||||
int compare(size_type pos1, size_type n1, const CharT* s) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
int compare(size_type pos1, size_type n1, const CharT* s) const
|
||||
{ return this->compare(pos1, n1, s, Traits::length(s)); }
|
||||
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
@@ -108,10 +108,12 @@ class vec_iterator
|
||||
, nat>::type nonconst_iterator;
|
||||
|
||||
public:
|
||||
BOOST_CONTAINER_FORCEINLINE const Pointer &get_ptr() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
const Pointer &get_ptr() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return m_ptr; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE Pointer &get_ptr() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
Pointer &get_ptr() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return m_ptr; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE explicit vec_iterator(Pointer ptr) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
@@ -138,13 +140,16 @@ class vec_iterator
|
||||
{ m_ptr = other.get_ptr(); return *this; }
|
||||
|
||||
//Pointer like operators
|
||||
BOOST_CONTAINER_FORCEINLINE reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ BOOST_ASSERT(!!m_ptr); return *m_ptr; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return m_ptr; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE reference operator[](difference_type off) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
reference operator[](difference_type off) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ BOOST_ASSERT(!!m_ptr); return m_ptr[off]; }
|
||||
|
||||
//Increment / Decrement
|
||||
@@ -167,35 +172,45 @@ class vec_iterator
|
||||
BOOST_CONTAINER_FORCEINLINE vec_iterator& operator-=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ BOOST_ASSERT(m_ptr || !off); m_ptr -= off; return *this; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend vec_iterator operator+(const vec_iterator &x, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend vec_iterator operator+(const vec_iterator &x, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ BOOST_ASSERT(x.m_ptr || !off); return vec_iterator(x.m_ptr+off); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend vec_iterator operator+(difference_type off, vec_iterator right) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend vec_iterator operator+(difference_type off, vec_iterator right) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ BOOST_ASSERT(right.m_ptr || !off); right.m_ptr += off; return right; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend vec_iterator operator-(vec_iterator left, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend vec_iterator operator-(vec_iterator left, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ BOOST_ASSERT(left.m_ptr || !off); left.m_ptr -= off; return left; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend difference_type operator-(const vec_iterator &left, const vec_iterator& right) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend difference_type operator-(const vec_iterator &left, const vec_iterator& right) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return left.m_ptr - right.m_ptr; }
|
||||
|
||||
//Comparison operators
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator== (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator== (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return l.m_ptr == r.m_ptr; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator!= (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return l.m_ptr != r.m_ptr; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator< (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator< (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return l.m_ptr < r.m_ptr; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator<= (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator<= (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return l.m_ptr <= r.m_ptr; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator> (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator> (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return l.m_ptr > r.m_ptr; }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE friend bool operator>= (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
friend bool operator>= (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return l.m_ptr >= r.m_ptr; }
|
||||
};
|
||||
|
||||
@@ -284,7 +299,8 @@ struct vector_alloc_holder
|
||||
typedef typename allocator_traits_type::size_type size_type;
|
||||
typedef typename allocator_traits_type::value_type value_type;
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE static bool is_propagable_from(const allocator_type &from_alloc, pointer p, const allocator_type &to_alloc, bool const propagate_allocator)
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
static bool is_propagable_from(const allocator_type &from_alloc, pointer p, const allocator_type &to_alloc, bool const propagate_allocator)
|
||||
{
|
||||
(void)propagate_allocator; (void)p; (void)to_alloc; (void)from_alloc;
|
||||
const bool all_storage_propagable = !allocator_traits_type::is_partially_propagable::value ||
|
||||
@@ -292,7 +308,8 @@ struct vector_alloc_holder
|
||||
return all_storage_propagable && (propagate_allocator || allocator_traits_type::equal(from_alloc, to_alloc));
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE static bool are_swap_propagable(const allocator_type &l_a, pointer l_p, const allocator_type &r_a, pointer r_p, bool const propagate_allocator)
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
static bool are_swap_propagable(const allocator_type &l_a, pointer l_p, const allocator_type &r_a, pointer r_p, bool const propagate_allocator)
|
||||
{
|
||||
(void)propagate_allocator; (void)l_p; (void)r_p; (void)l_a; (void)r_a;
|
||||
const bool all_storage_propagable = !allocator_traits_type::is_partially_propagable::value ||
|
||||
@@ -399,7 +416,7 @@ struct vector_alloc_holder
|
||||
{ this->m_capacity = static_cast<stored_size_type>(c); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE pointer allocation_command(boost::container::allocation_type command,
|
||||
size_type limit_size, size_type &prefer_in_recvd_out_size, pointer &reuse)
|
||||
size_type limit_size, size_type &prefer_in_recvd_out_size, pointer &reuse)
|
||||
{
|
||||
typedef typename dtl::version<allocator_type>::type alloc_version;
|
||||
return this->priv_allocation_command(alloc_version(), command, limit_size, prefer_in_recvd_out_size, reuse);
|
||||
@@ -503,7 +520,7 @@ struct vector_alloc_holder
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE pointer priv_allocation_command(version_1, boost::container::allocation_type command,
|
||||
pointer priv_allocation_command(version_1, boost::container::allocation_type command,
|
||||
size_type limit_size,
|
||||
size_type &prefer_in_recvd_out_size,
|
||||
pointer &reuse)
|
||||
@@ -1038,7 +1055,7 @@ private:
|
||||
: m_holder(boost::move(x.m_holder))
|
||||
{}
|
||||
|
||||
#endif //!defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
#endif // defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
//! <b>Effects</b>: Copy constructs a vector using the specified allocator.
|
||||
//!
|
||||
@@ -1318,7 +1335,7 @@ private:
|
||||
//! <b>Throws</b>: If allocator's copy constructor throws.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->m_holder.alloc(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reference to the internal allocator.
|
||||
@@ -1328,7 +1345,8 @@ private:
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
BOOST_CONTAINER_FORCEINLINE stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->m_holder.alloc(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reference to the internal allocator.
|
||||
@@ -1338,7 +1356,8 @@ private:
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
BOOST_CONTAINER_FORCEINLINE const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->m_holder.alloc(); }
|
||||
|
||||
//////////////////////////////////////////////
|
||||
@@ -1352,7 +1371,7 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return iterator(this->m_holder.start()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the first element contained in the vector.
|
||||
@@ -1360,7 +1379,7 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return const_iterator(this->m_holder.start()); }
|
||||
|
||||
//! <b>Effects</b>: Returns an iterator to the end of the vector.
|
||||
@@ -1368,7 +1387,7 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE iterator end() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE iterator end() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
iterator it (this->m_holder.start());
|
||||
it += this->m_holder.m_size;
|
||||
@@ -1380,7 +1399,7 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->cend(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
|
||||
@@ -1389,7 +1408,7 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return reverse_iterator(this->end()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
|
||||
@@ -1398,7 +1417,7 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->crbegin(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reverse_iterator pointing to the end
|
||||
@@ -1407,7 +1426,7 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return reverse_iterator(this->begin()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
|
||||
@@ -1416,7 +1435,7 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->crend(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the first element contained in the vector.
|
||||
@@ -1424,7 +1443,7 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return const_iterator(this->m_holder.start()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the end of the vector.
|
||||
@@ -1432,7 +1451,7 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
const_iterator it (this->m_holder.start());
|
||||
it += this->m_holder.m_size;
|
||||
@@ -1445,7 +1464,7 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return const_reverse_iterator(this->end());}
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
|
||||
@@ -1454,7 +1473,7 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return const_reverse_iterator(this->begin()); }
|
||||
|
||||
//////////////////////////////////////////////
|
||||
@@ -1468,7 +1487,7 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return !this->m_holder.m_size; }
|
||||
|
||||
//! <b>Effects</b>: Returns the number of the elements contained in the vector.
|
||||
@@ -1476,7 +1495,7 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->m_holder.m_size; }
|
||||
|
||||
//! <b>Effects</b>: Returns the largest possible size of the vector.
|
||||
@@ -1484,7 +1503,7 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return allocator_traits_type::max_size(this->m_holder.alloc()); }
|
||||
|
||||
//! <b>Effects</b>: Inserts or erases elements at the end such that
|
||||
@@ -1522,7 +1541,7 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->m_holder.capacity(); }
|
||||
|
||||
//! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
|
||||
@@ -1561,7 +1580,7 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE reference front() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE reference front() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(!this->empty());
|
||||
return *this->m_holder.start();
|
||||
@@ -1575,7 +1594,7 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(!this->empty());
|
||||
return *this->m_holder.start();
|
||||
@@ -1589,7 +1608,7 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE reference back() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE reference back() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(!this->empty());
|
||||
return this->m_holder.start()[this->m_holder.m_size - 1];
|
||||
@@ -1603,7 +1622,7 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(!this->empty());
|
||||
return this->m_holder.start()[this->m_holder.m_size - 1];
|
||||
@@ -1617,7 +1636,7 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(this->m_holder.m_size > n);
|
||||
return this->m_holder.start()[n];
|
||||
@@ -1631,7 +1650,8 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(this->m_holder.m_size > n);
|
||||
return this->m_holder.start()[n];
|
||||
@@ -1648,7 +1668,8 @@ private:
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension
|
||||
BOOST_CONTAINER_FORCEINLINE iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(this->m_holder.m_size >= n);
|
||||
return iterator(this->m_holder.start()+n);
|
||||
@@ -1665,7 +1686,8 @@ private:
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
BOOST_ASSERT(this->m_holder.m_size >= n);
|
||||
return const_iterator(this->m_holder.start()+n);
|
||||
@@ -1681,7 +1703,8 @@ private:
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension
|
||||
BOOST_CONTAINER_FORCEINLINE size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
//Range check assert done in priv_index_of
|
||||
return this->priv_index_of(vector_iterator_get_ptr(p));
|
||||
@@ -1697,7 +1720,8 @@ private:
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension
|
||||
BOOST_CONTAINER_FORCEINLINE size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
|
||||
size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
//Range check assert done in priv_index_of
|
||||
return this->priv_index_of(vector_iterator_get_ptr(p));
|
||||
@@ -1711,7 +1735,7 @@ private:
|
||||
//! <b>Throws</b>: std::range_error if n >= size()
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE reference at(size_type n)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE reference at(size_type n)
|
||||
{
|
||||
this->priv_throw_if_out_of_range(n);
|
||||
return this->m_holder.start()[n];
|
||||
@@ -1725,7 +1749,7 @@ private:
|
||||
//! <b>Throws</b>: std::range_error if n >= size()
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const_reference at(size_type n) const
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE const_reference at(size_type n) const
|
||||
{
|
||||
this->priv_throw_if_out_of_range(n);
|
||||
return this->m_holder.start()[n];
|
||||
@@ -1743,7 +1767,7 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE T* data() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE T* data() BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->priv_raw_begin(); }
|
||||
|
||||
//! <b>Returns</b>: A pointer such that [data(),data() + size()) is a valid range.
|
||||
@@ -1752,7 +1776,7 @@ private:
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE const T * data() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE const T * data() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return this->priv_raw_begin(); }
|
||||
|
||||
//////////////////////////////////////////////
|
||||
@@ -2136,37 +2160,37 @@ private:
|
||||
//! <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_FORCEINLINE friend bool operator==(const vector& x, const vector& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE friend bool operator==(const vector& x, const 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_FORCEINLINE friend bool operator!=(const vector& x, const vector& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const vector& x, const 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.
|
||||
friend bool operator<(const vector& x, const vector& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD friend bool operator<(const vector& x, const 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_FORCEINLINE friend bool operator>(const vector& x, const vector& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE friend bool operator>(const vector& x, const 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_FORCEINLINE friend bool operator<=(const vector& x, const vector& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const vector& x, const 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_FORCEINLINE friend bool operator>=(const vector& x, const vector& y)
|
||||
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const vector& x, const vector& y)
|
||||
{ return !(x < y); }
|
||||
|
||||
//! <b>Effects</b>: x.swap(y)
|
||||
|
@@ -1844,7 +1844,7 @@ template <class Devector> void test_at()
|
||||
a.at(0) = T(100);
|
||||
BOOST_TEST(a.at(0) == 100);
|
||||
|
||||
BOOST_TEST_THROWS(a.at(3), std::out_of_range);
|
||||
BOOST_TEST_THROWS((void)a.at(3), std::out_of_range);
|
||||
}
|
||||
|
||||
{ // const at
|
||||
@@ -1853,7 +1853,7 @@ template <class Devector> void test_at()
|
||||
|
||||
BOOST_TEST(a.at(0) == 1);
|
||||
|
||||
BOOST_TEST_THROWS(a.at(3), std::out_of_range);
|
||||
BOOST_TEST_THROWS((void)a.at(3), std::out_of_range);
|
||||
}
|
||||
#endif //#ifndef BOOST_NO_EXCEPTIONS
|
||||
}
|
||||
|
@@ -19,6 +19,11 @@
|
||||
#include <boost/move/iterator.hpp>
|
||||
#include <boost/move/make_unique.hpp>
|
||||
|
||||
#if defined(BOOST_GCC) && (BOOST_GCC >= 40500)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-result"
|
||||
#endif
|
||||
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME rebalance
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace test {
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
|
||||
@@ -26,6 +31,11 @@
|
||||
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 0
|
||||
#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
|
||||
|
||||
//#pragma GCC diagnostic ignored "-Wunused-result"
|
||||
#if defined(BOOST_GCC) && (BOOST_GCC >= 40500)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
namespace container {
|
||||
namespace test{
|
||||
|
@@ -25,7 +25,7 @@ void test_ctor_ndc()
|
||||
BOOST_TEST_EQ(s.size() , 0u);
|
||||
BOOST_TEST(s.capacity() == N);
|
||||
BOOST_TEST(s.max_size() == N);
|
||||
BOOST_TEST_THROWS( s.at(0u), std::out_of_range );
|
||||
BOOST_TEST_THROWS( (void)s.at(0u), std::out_of_range );
|
||||
}
|
||||
|
||||
template <typename T, size_t N>
|
||||
@@ -36,7 +36,7 @@ void test_ctor_nc(size_t n)
|
||||
BOOST_TEST(s.size() == n);
|
||||
BOOST_TEST(s.capacity() == N);
|
||||
BOOST_TEST(s.max_size() == N);
|
||||
BOOST_TEST_THROWS( s.at(n), std::out_of_range );
|
||||
BOOST_TEST_THROWS( (void)s.at(n), std::out_of_range );
|
||||
if ( 1 < n )
|
||||
{
|
||||
s[0] = 10;
|
||||
@@ -55,7 +55,7 @@ void test_ctor_nd(size_t n, T const& v)
|
||||
BOOST_STATIC_ASSERT((static_vector<T, N>::static_capacity) == N);
|
||||
BOOST_TEST(s.size() == n);
|
||||
BOOST_TEST(s.capacity() == N);
|
||||
BOOST_TEST_THROWS( s.at(n), std::out_of_range );
|
||||
BOOST_TEST_THROWS( (void)s.at(n), std::out_of_range );
|
||||
if ( 1 < n )
|
||||
{
|
||||
BOOST_TEST(v == s[0]);
|
||||
@@ -114,7 +114,7 @@ void test_resize_nc(size_t n)
|
||||
s.resize(n);
|
||||
BOOST_TEST(s.size() == n);
|
||||
BOOST_TEST(s.capacity() == N);
|
||||
BOOST_TEST_THROWS( s.at(n), std::out_of_range );
|
||||
BOOST_TEST_THROWS( (void)s.at(n), std::out_of_range );
|
||||
if ( 1 < n )
|
||||
{
|
||||
s[0] = 10;
|
||||
@@ -134,7 +134,7 @@ void test_resize_nd(size_t n, T const& v)
|
||||
s.resize(n, v);
|
||||
BOOST_TEST(s.size() == n);
|
||||
BOOST_TEST(s.capacity() == N);
|
||||
BOOST_TEST_THROWS( s.at(n), std::out_of_range );
|
||||
BOOST_TEST_THROWS( (void)s.at(n), std::out_of_range );
|
||||
if ( 1 < n )
|
||||
{
|
||||
BOOST_TEST(v == s[0]);
|
||||
@@ -156,14 +156,14 @@ void test_push_back_nd()
|
||||
static_vector<T, N> s;
|
||||
|
||||
BOOST_TEST(s.size() == 0);
|
||||
BOOST_TEST_THROWS( s.at(0), std::out_of_range );
|
||||
BOOST_TEST_THROWS( (void)s.at(0), std::out_of_range );
|
||||
|
||||
for ( size_t i = 0 ; i < N ; ++i )
|
||||
{
|
||||
T t(static_cast<int>(i));
|
||||
s.push_back(t);
|
||||
BOOST_TEST(s.size() == i + 1);
|
||||
BOOST_TEST_THROWS( s.at(i + 1), std::out_of_range );
|
||||
BOOST_TEST_THROWS( (void)s.at(i + 1), std::out_of_range );
|
||||
BOOST_TEST(T((int)i) == s.at(i));
|
||||
BOOST_TEST(T((int)i) == s[i]);
|
||||
BOOST_TEST(T((int)i) == s.back());
|
||||
@@ -187,7 +187,7 @@ void test_pop_back_nd()
|
||||
{
|
||||
s.pop_back();
|
||||
BOOST_TEST(s.size() == i - 1);
|
||||
BOOST_TEST_THROWS( s.at(i - 1), std::out_of_range );
|
||||
BOOST_TEST_THROWS( (void)s.at(i - 1), std::out_of_range );
|
||||
BOOST_TEST(T((int)i - 2) == s.at(i - 2));
|
||||
BOOST_TEST(T((int)i - 2) == s[i - 2]);
|
||||
BOOST_TEST(T((int)i - 2) == s.back());
|
||||
@@ -418,7 +418,7 @@ void test_capacity_0_nd()
|
||||
static_vector_0_t s;
|
||||
BOOST_TEST(s.size() == 0);
|
||||
BOOST_TEST(s.capacity() == 0);
|
||||
BOOST_TEST_THROWS(s.at(0), std::out_of_range);
|
||||
BOOST_TEST_THROWS((void)s.at(0), std::out_of_range);
|
||||
BOOST_TEST_THROWS(s.resize(5u, T(0)), std::bad_alloc);
|
||||
BOOST_TEST_THROWS(s.push_back(T(0)), std::bad_alloc);
|
||||
BOOST_TEST_THROWS(s.insert(s.end(), T(0)), std::bad_alloc);
|
||||
|
Reference in New Issue
Block a user