forked from boostorg/container
Don't use BOOST_CONTAINER_FORCEINLINE extensively, due to potential code bloat
This commit is contained in:
@@ -133,7 +133,7 @@ class flat_set
|
||||
//! <b>Effects</b>: Default constructs an empty container.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
inline
|
||||
flat_set() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<AllocatorOrContainer>::value &&
|
||||
dtl::is_nothrow_default_constructible<Compare>::value)
|
||||
: tree_t()
|
||||
@@ -143,7 +143,7 @@ class flat_set
|
||||
//! comparison object.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
inline
|
||||
explicit flat_set(const Compare& comp)
|
||||
: tree_t(comp)
|
||||
{}
|
||||
@@ -151,7 +151,7 @@ class flat_set
|
||||
//! <b>Effects</b>: Constructs an empty container using the specified allocator.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
inline
|
||||
explicit flat_set(const allocator_type& a)
|
||||
: tree_t(a)
|
||||
{}
|
||||
@@ -160,7 +160,7 @@ class flat_set
|
||||
//! comparison object and allocator.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
inline
|
||||
flat_set(const Compare& comp, const allocator_type& a)
|
||||
: tree_t(comp, a)
|
||||
{}
|
||||
@@ -171,7 +171,7 @@ class flat_set
|
||||
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
|
||||
//! comp and otherwise N logN, where N is last - first.
|
||||
template <class InputIterator>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
inline
|
||||
flat_set(InputIterator first, InputIterator last)
|
||||
: tree_t(true, first, last)
|
||||
{}
|
||||
@@ -182,7 +182,7 @@ class flat_set
|
||||
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
|
||||
//! comp and otherwise N logN, where N is last - first.
|
||||
template <class InputIterator>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
inline
|
||||
flat_set(InputIterator first, InputIterator last, const allocator_type& a)
|
||||
: tree_t(true, first, last, a)
|
||||
{}
|
||||
@@ -193,7 +193,7 @@ class flat_set
|
||||
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
|
||||
//! comp and otherwise N logN, where N is last - first.
|
||||
template <class InputIterator>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
inline
|
||||
flat_set(InputIterator first, InputIterator last, const Compare& comp)
|
||||
: tree_t(true, first, last, comp)
|
||||
{}
|
||||
@@ -204,7 +204,7 @@ class flat_set
|
||||
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
|
||||
//! comp and otherwise N logN, where N is last - first.
|
||||
template <class InputIterator>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
inline
|
||||
flat_set(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
|
||||
: tree_t(true, first, last, comp, a)
|
||||
{}
|
||||
@@ -220,7 +220,7 @@ class flat_set
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
template <class InputIterator>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
inline
|
||||
flat_set(ordered_unique_range_t, InputIterator first, InputIterator last)
|
||||
: tree_t(ordered_unique_range, first, last)
|
||||
{}
|
||||
@@ -236,7 +236,7 @@ class flat_set
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
template <class InputIterator>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
inline
|
||||
flat_set(ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp)
|
||||
: tree_t(ordered_unique_range, first, last, comp)
|
||||
{}
|
||||
@@ -252,7 +252,7 @@ class flat_set
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
template <class InputIterator>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
inline
|
||||
flat_set(ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
|
||||
: tree_t(ordered_unique_range, first, last, comp, a)
|
||||
{}
|
||||
@@ -268,7 +268,7 @@ class flat_set
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
template <class InputIterator>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
inline
|
||||
flat_set(ordered_unique_range_t, InputIterator first, InputIterator last, const allocator_type& a)
|
||||
: tree_t(ordered_unique_range, first, last, Compare(), a)
|
||||
{}
|
||||
@@ -279,7 +279,7 @@ class flat_set
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
|
||||
//! comp and otherwise N logN, where N is il.begin() - il.end().
|
||||
BOOST_CONTAINER_FORCEINLINE flat_set(std::initializer_list<value_type> il)
|
||||
inline flat_set(std::initializer_list<value_type> il)
|
||||
: tree_t(true, il.begin(), il.end())
|
||||
{}
|
||||
|
||||
@@ -288,7 +288,7 @@ class flat_set
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
|
||||
//! comp and otherwise N logN, where N is il.begin() - il.end().
|
||||
BOOST_CONTAINER_FORCEINLINE flat_set(std::initializer_list<value_type> il, const allocator_type& a)
|
||||
inline flat_set(std::initializer_list<value_type> il, const allocator_type& a)
|
||||
: tree_t(true, il.begin(), il.end(), a)
|
||||
{}
|
||||
|
||||
@@ -297,7 +297,7 @@ class flat_set
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
|
||||
//! comp and otherwise N logN, where N is il.begin() - il.end().
|
||||
BOOST_CONTAINER_FORCEINLINE flat_set(std::initializer_list<value_type> il, const Compare& comp)
|
||||
inline flat_set(std::initializer_list<value_type> il, const Compare& comp)
|
||||
: tree_t(true, il.begin(), il.end(), comp)
|
||||
{}
|
||||
|
||||
@@ -306,7 +306,7 @@ class flat_set
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
|
||||
//! comp and otherwise N logN, where N is il.begin() - il.end().
|
||||
BOOST_CONTAINER_FORCEINLINE flat_set(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
|
||||
inline flat_set(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
|
||||
: tree_t(true, il.begin(), il.end(), comp, a)
|
||||
{}
|
||||
|
||||
@@ -320,7 +320,7 @@ class flat_set
|
||||
//! <b>Complexity</b>: Linear in N.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
BOOST_CONTAINER_FORCEINLINE flat_set(ordered_unique_range_t, std::initializer_list<value_type> il)
|
||||
inline flat_set(ordered_unique_range_t, std::initializer_list<value_type> il)
|
||||
: tree_t(ordered_unique_range, il.begin(), il.end())
|
||||
{}
|
||||
|
||||
@@ -334,7 +334,7 @@ class flat_set
|
||||
//! <b>Complexity</b>: Linear in N.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
BOOST_CONTAINER_FORCEINLINE flat_set(ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp)
|
||||
inline flat_set(ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp)
|
||||
: tree_t(ordered_unique_range, il.begin(), il.end(), comp)
|
||||
{}
|
||||
|
||||
@@ -348,7 +348,7 @@ class flat_set
|
||||
//! <b>Complexity</b>: Linear in N.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
BOOST_CONTAINER_FORCEINLINE flat_set(ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
|
||||
inline flat_set(ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
|
||||
: tree_t(ordered_unique_range, il.begin(), il.end(), comp, a)
|
||||
{}
|
||||
#endif
|
||||
@@ -356,7 +356,7 @@ class flat_set
|
||||
//! <b>Effects</b>: Copy constructs the container.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear in x.size().
|
||||
BOOST_CONTAINER_FORCEINLINE flat_set(const flat_set& x)
|
||||
inline flat_set(const flat_set& x)
|
||||
: tree_t(static_cast<const tree_t&>(x))
|
||||
{}
|
||||
|
||||
@@ -365,7 +365,7 @@ class flat_set
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Postcondition</b>: x is emptied.
|
||||
BOOST_CONTAINER_FORCEINLINE flat_set(BOOST_RV_REF(flat_set) x)
|
||||
inline flat_set(BOOST_RV_REF(flat_set) x)
|
||||
BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
|
||||
: tree_t(BOOST_MOVE_BASE(tree_t, x))
|
||||
{}
|
||||
@@ -373,7 +373,7 @@ class flat_set
|
||||
//! <b>Effects</b>: Copy constructs a container using the specified allocator.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear in x.size().
|
||||
BOOST_CONTAINER_FORCEINLINE flat_set(const flat_set& x, const allocator_type &a)
|
||||
inline flat_set(const flat_set& x, const allocator_type &a)
|
||||
: tree_t(static_cast<const tree_t&>(x), a)
|
||||
{}
|
||||
|
||||
@@ -381,14 +381,14 @@ class flat_set
|
||||
//! Constructs *this using x's resources.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise
|
||||
BOOST_CONTAINER_FORCEINLINE flat_set(BOOST_RV_REF(flat_set) x, const allocator_type &a)
|
||||
inline flat_set(BOOST_RV_REF(flat_set) x, const allocator_type &a)
|
||||
: tree_t(BOOST_MOVE_BASE(tree_t, x), a)
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: Makes *this a copy of x.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear in x.size().
|
||||
BOOST_CONTAINER_FORCEINLINE flat_set& operator=(BOOST_COPY_ASSIGN_REF(flat_set) x)
|
||||
inline flat_set& operator=(BOOST_COPY_ASSIGN_REF(flat_set) x)
|
||||
{ return static_cast<flat_set&>(this->tree_t::operator=(static_cast<const tree_t&>(x))); }
|
||||
|
||||
//! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
|
||||
@@ -397,7 +397,7 @@ class flat_set
|
||||
//! <b>Complexity</b>: Constant if allocator_traits_type::
|
||||
//! propagate_on_container_move_assignment is true or
|
||||
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
||||
BOOST_CONTAINER_FORCEINLINE flat_set& operator=(BOOST_RV_REF(flat_set) x)
|
||||
inline flat_set& operator=(BOOST_RV_REF(flat_set) x)
|
||||
BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
|
||||
allocator_traits_type::is_always_equal::value) &&
|
||||
boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
|
||||
@@ -602,7 +602,7 @@ class flat_set
|
||||
//!
|
||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||
template <class... Args>
|
||||
BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_FWD_REF(Args)... args)
|
||||
inline std::pair<iterator,bool> emplace(BOOST_FWD_REF(Args)... args)
|
||||
{ return this->tree_t::emplace_unique(boost::forward<Args>(args)...); }
|
||||
|
||||
//! <b>Effects</b>: Inserts an object of type Key constructed with
|
||||
@@ -618,18 +618,18 @@ class flat_set
|
||||
//!
|
||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||
template <class... Args>
|
||||
BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
|
||||
inline iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
|
||||
{ return this->tree_t::emplace_hint_unique(p, boost::forward<Args>(args)...); }
|
||||
|
||||
#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
#define BOOST_CONTAINER_FLAT_SET_EMPLACE_CODE(N) \
|
||||
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
|
||||
BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_MOVE_UREF##N)\
|
||||
inline std::pair<iterator,bool> emplace(BOOST_MOVE_UREF##N)\
|
||||
{ return this->tree_t::emplace_unique(BOOST_MOVE_FWD##N); }\
|
||||
\
|
||||
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
|
||||
BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
||||
inline iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
||||
{ return this->tree_t::emplace_hint_unique(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
|
||||
//
|
||||
BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_FLAT_SET_EMPLACE_CODE)
|
||||
@@ -707,7 +707,7 @@ class flat_set
|
||||
//!
|
||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||
template <class InputIterator>
|
||||
BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
|
||||
inline void insert(InputIterator first, InputIterator last)
|
||||
{ this->tree_t::insert_unique(first, last); }
|
||||
|
||||
//! <b>Requires</b>: first, last are not iterators into *this and
|
||||
@@ -721,7 +721,7 @@ class flat_set
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension. If an element is inserted it might invalidate elements.
|
||||
template <class InputIterator>
|
||||
BOOST_CONTAINER_FORCEINLINE void insert(ordered_unique_range_t, InputIterator first, InputIterator last)
|
||||
inline void insert(ordered_unique_range_t, InputIterator first, InputIterator last)
|
||||
{ this->tree_t::insert_unique(ordered_unique_range, first, last); }
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
@@ -731,7 +731,7 @@ class flat_set
|
||||
//! <b>Complexity</b>: N log(N).
|
||||
//!
|
||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||
BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
|
||||
inline void insert(std::initializer_list<value_type> il)
|
||||
{ this->tree_t::insert_unique(il.begin(), il.end()); }
|
||||
|
||||
//! <b>Requires</b>: Range [il.begin(), il.end()) must be ordered according to the predicate
|
||||
@@ -743,28 +743,28 @@ class flat_set
|
||||
//! <b>Complexity</b>: Linear.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension. If an element is inserted it might invalidate elements.
|
||||
BOOST_CONTAINER_FORCEINLINE void insert(ordered_unique_range_t, std::initializer_list<value_type> il)
|
||||
inline void insert(ordered_unique_range_t, std::initializer_list<value_type> il)
|
||||
{ this->tree_t::insert_unique(ordered_unique_range, il.begin(), il.end()); }
|
||||
#endif
|
||||
|
||||
//! @copydoc ::boost::container::flat_map::merge(flat_map<Key, T, C2, AllocatorOrContainer>&)
|
||||
template<class C2>
|
||||
BOOST_CONTAINER_FORCEINLINE void merge(flat_set<Key, C2, AllocatorOrContainer>& source)
|
||||
inline void merge(flat_set<Key, C2, AllocatorOrContainer>& source)
|
||||
{ this->tree_t::merge_unique(source.tree()); }
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::merge(flat_set<Key, C2, AllocatorOrContainer>&)
|
||||
template<class C2>
|
||||
BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_set<Key, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
|
||||
inline void merge(BOOST_RV_REF_BEG flat_set<Key, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
|
||||
{ return this->merge(static_cast<flat_set<Key, C2, AllocatorOrContainer>&>(source)); }
|
||||
|
||||
//! @copydoc ::boost::container::flat_map::merge(flat_multimap<Key, T, C2, AllocatorOrContainer>&)
|
||||
template<class C2>
|
||||
BOOST_CONTAINER_FORCEINLINE void merge(flat_multiset<Key, C2, AllocatorOrContainer>& source)
|
||||
inline void merge(flat_multiset<Key, C2, AllocatorOrContainer>& source)
|
||||
{ this->tree_t::merge_unique(source.tree()); }
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::merge(flat_multiset<Key, C2, AllocatorOrContainer>&)
|
||||
template<class C2>
|
||||
BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multiset<Key, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
|
||||
inline void merge(BOOST_RV_REF_BEG flat_multiset<Key, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
|
||||
{ return this->merge(static_cast<flat_multiset<Key, C2, AllocatorOrContainer>&>(source)); }
|
||||
|
||||
//! <b>Effects</b>: If present, erases the element in the container with key equivalent to x.
|
||||
@@ -773,7 +773,7 @@ class flat_set
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic search time plus erasure time
|
||||
//! linear to the elements with bigger keys.
|
||||
BOOST_CONTAINER_FORCEINLINE size_type erase(const key_type& x)
|
||||
inline size_type erase(const key_type& x)
|
||||
{ return this->tree_t::erase_unique(x); }
|
||||
|
||||
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
@@ -917,7 +917,7 @@ class flat_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
|
||||
inline size_type count(const key_type& x) const
|
||||
{ return static_cast<size_type>(this->tree_t::find(x) != this->tree_t::cend()); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
@@ -927,7 +927,7 @@ class flat_set
|
||||
//!
|
||||
//! <b>Complexity</b>: log(size())+count(k)
|
||||
template<typename K>
|
||||
BOOST_CONTAINER_FORCEINLINE size_type count(const K& x) const
|
||||
inline 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 this->tree_t::count(x); }
|
||||
@@ -1019,13 +1019,13 @@ class flat_set
|
||||
//! <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
|
||||
inline std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const
|
||||
{ return this->tree_t::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<iterator,iterator> equal_range(const key_type& x)
|
||||
inline std::pair<iterator,iterator> equal_range(const key_type& x)
|
||||
{ return this->tree_t::lower_bound_range(x); }
|
||||
|
||||
//! <b>Requires</b>: This overload is available only if
|
||||
@@ -1108,7 +1108,7 @@ class flat_set
|
||||
//! <b>Complexity</b>: Assuming O(1) move assignment, O(NlogN) with N = seq.size()
|
||||
//!
|
||||
//! <b>Throws</b>: If the comparison or the move constructor throws
|
||||
BOOST_CONTAINER_FORCEINLINE void adopt_sequence(BOOST_RV_REF(sequence_type) seq)
|
||||
inline void adopt_sequence(BOOST_RV_REF(sequence_type) seq)
|
||||
{ this->tree_t::adopt_sequence_unique(boost::move(seq)); }
|
||||
|
||||
//! <b>Requires</b>: seq shall be ordered according to this->compare()
|
||||
@@ -1120,7 +1120,7 @@ class flat_set
|
||||
//! <b>Complexity</b>: Assuming O(1) move assignment, O(1)
|
||||
//!
|
||||
//! <b>Throws</b>: If the move assignment throws
|
||||
BOOST_CONTAINER_FORCEINLINE void adopt_sequence(ordered_unique_range_t, BOOST_RV_REF(sequence_type) seq)
|
||||
inline void adopt_sequence(ordered_unique_range_t, BOOST_RV_REF(sequence_type) seq)
|
||||
{ this->tree_t::adopt_sequence_unique(ordered_unique_range_t(), boost::move(seq)); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const view of the underlying sequence.
|
||||
@@ -1128,7 +1128,7 @@ class flat_set
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing
|
||||
BOOST_CONTAINER_FORCEINLINE const sequence_type & sequence() const BOOST_NOEXCEPT
|
||||
inline const sequence_type & sequence() const BOOST_NOEXCEPT
|
||||
{ return this->get_sequence_cref(); }
|
||||
};
|
||||
|
||||
@@ -1279,47 +1279,47 @@ class flat_multiset
|
||||
typedef typename sequence_type::const_reverse_iterator const_reverse_iterator;
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::flat_set()
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<AllocatorOrContainer>::value &&
|
||||
inline flat_multiset() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<AllocatorOrContainer>::value &&
|
||||
dtl::is_nothrow_default_constructible<Compare>::value)
|
||||
: tree_t()
|
||||
{}
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::flat_set(const Compare&)
|
||||
BOOST_CONTAINER_FORCEINLINE explicit flat_multiset(const Compare& comp)
|
||||
inline explicit flat_multiset(const Compare& comp)
|
||||
: tree_t(comp)
|
||||
{}
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::flat_set(const allocator_type&)
|
||||
BOOST_CONTAINER_FORCEINLINE explicit flat_multiset(const allocator_type& a)
|
||||
inline explicit flat_multiset(const allocator_type& a)
|
||||
: tree_t(a)
|
||||
{}
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::flat_set(const Compare&, const allocator_type&)
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset(const Compare& comp, const allocator_type& a)
|
||||
inline flat_multiset(const Compare& comp, const allocator_type& a)
|
||||
: tree_t(comp, a)
|
||||
{}
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::flat_set(InputIterator, InputIterator)
|
||||
template <class InputIterator>
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset(InputIterator first, InputIterator last)
|
||||
inline flat_multiset(InputIterator first, InputIterator last)
|
||||
: tree_t(false, first, last)
|
||||
{}
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::flat_set(InputIterator, InputIterator, const allocator_type&)
|
||||
template <class InputIterator>
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset(InputIterator first, InputIterator last, const allocator_type& a)
|
||||
inline flat_multiset(InputIterator first, InputIterator last, const allocator_type& a)
|
||||
: tree_t(false, first, last, a)
|
||||
{}
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::flat_set(InputIterator, InputIterator, const Compare& comp)
|
||||
template <class InputIterator>
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset(InputIterator first, InputIterator last, const Compare& comp)
|
||||
inline flat_multiset(InputIterator first, InputIterator last, const Compare& comp)
|
||||
: tree_t(false, first, last, comp)
|
||||
{}
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::flat_set(InputIterator, InputIterator, const Compare& comp, const allocator_type&)
|
||||
template <class InputIterator>
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
|
||||
inline flat_multiset(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
|
||||
: tree_t(false, first, last, comp, a)
|
||||
{}
|
||||
|
||||
@@ -1333,7 +1333,7 @@ class flat_multiset
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
template <class InputIterator>
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, InputIterator first, InputIterator last)
|
||||
inline flat_multiset(ordered_range_t, InputIterator first, InputIterator last)
|
||||
: tree_t(ordered_range, first, last)
|
||||
{}
|
||||
|
||||
@@ -1347,7 +1347,7 @@ class flat_multiset
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
template <class InputIterator>
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp)
|
||||
inline flat_multiset(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp)
|
||||
: tree_t(ordered_range, first, last, comp)
|
||||
{}
|
||||
|
||||
@@ -1361,7 +1361,7 @@ class flat_multiset
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
template <class InputIterator>
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
|
||||
inline flat_multiset(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
|
||||
: tree_t(ordered_range, first, last, comp, a)
|
||||
{}
|
||||
|
||||
@@ -1375,28 +1375,28 @@ class flat_multiset
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
template <class InputIterator>
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, InputIterator first, InputIterator last, const allocator_type &a)
|
||||
inline flat_multiset(ordered_range_t, InputIterator first, InputIterator last, const allocator_type &a)
|
||||
: tree_t(ordered_range, first, last, Compare(), a)
|
||||
{}
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
//! @copydoc ::boost::container::flat_set::flat_set(std::initializer_list<value_type)
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset(std::initializer_list<value_type> il)
|
||||
inline flat_multiset(std::initializer_list<value_type> il)
|
||||
: tree_t(false, il.begin(), il.end())
|
||||
{}
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::flat_set(std::initializer_list<value_type>, const allocator_type&)
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset(std::initializer_list<value_type> il, const allocator_type& a)
|
||||
inline flat_multiset(std::initializer_list<value_type> il, const allocator_type& a)
|
||||
: tree_t(false, il.begin(), il.end(), a)
|
||||
{}
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::flat_set(std::initializer_list<value_type>, const Compare& comp)
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset(std::initializer_list<value_type> il, const Compare& comp)
|
||||
inline flat_multiset(std::initializer_list<value_type> il, const Compare& comp)
|
||||
: tree_t(false, il.begin(), il.end(), comp)
|
||||
{}
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::flat_set(std::initializer_list<value_type>, const Compare& comp, const allocator_type&)
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
|
||||
inline flat_multiset(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
|
||||
: tree_t(false, il.begin(), il.end(), comp, a)
|
||||
{}
|
||||
|
||||
@@ -1409,7 +1409,7 @@ class flat_multiset
|
||||
//! <b>Complexity</b>: Linear in N.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, std::initializer_list<value_type> il)
|
||||
inline flat_multiset(ordered_range_t, std::initializer_list<value_type> il)
|
||||
: tree_t(ordered_range, il.begin(), il.end())
|
||||
{}
|
||||
|
||||
@@ -1422,7 +1422,7 @@ class flat_multiset
|
||||
//! <b>Complexity</b>: Linear in N.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp)
|
||||
inline flat_multiset(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp)
|
||||
: tree_t(ordered_range, il.begin(), il.end(), comp)
|
||||
{}
|
||||
|
||||
@@ -1435,38 +1435,38 @@ class flat_multiset
|
||||
//! <b>Complexity</b>: Linear in N.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
|
||||
inline flat_multiset(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
|
||||
: tree_t(ordered_range, il.begin(), il.end(), comp, a)
|
||||
{}
|
||||
#endif
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::flat_set(const flat_set &)
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset(const flat_multiset& x)
|
||||
inline flat_multiset(const flat_multiset& x)
|
||||
: tree_t(static_cast<const tree_t&>(x))
|
||||
{}
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::flat_set(flat_set &&)
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset(BOOST_RV_REF(flat_multiset) x)
|
||||
inline flat_multiset(BOOST_RV_REF(flat_multiset) x)
|
||||
BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
|
||||
: tree_t(boost::move(static_cast<tree_t&>(x)))
|
||||
{}
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::flat_set(const flat_set &, const allocator_type &)
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset(const flat_multiset& x, const allocator_type &a)
|
||||
inline flat_multiset(const flat_multiset& x, const allocator_type &a)
|
||||
: tree_t(static_cast<const tree_t&>(x), a)
|
||||
{}
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::flat_set(flat_set &&, const allocator_type &)
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset(BOOST_RV_REF(flat_multiset) x, const allocator_type &a)
|
||||
inline flat_multiset(BOOST_RV_REF(flat_multiset) x, const allocator_type &a)
|
||||
: tree_t(BOOST_MOVE_BASE(tree_t, x), a)
|
||||
{}
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::operator=(const flat_set &)
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset& operator=(BOOST_COPY_ASSIGN_REF(flat_multiset) x)
|
||||
inline flat_multiset& operator=(BOOST_COPY_ASSIGN_REF(flat_multiset) x)
|
||||
{ return static_cast<flat_multiset&>(this->tree_t::operator=(static_cast<const tree_t&>(x))); }
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::operator=(flat_set &&)
|
||||
BOOST_CONTAINER_FORCEINLINE flat_multiset& operator=(BOOST_RV_REF(flat_multiset) x)
|
||||
inline flat_multiset& operator=(BOOST_RV_REF(flat_multiset) x)
|
||||
BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
|
||||
allocator_traits_type::is_always_equal::value) &&
|
||||
boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
|
||||
@@ -1566,7 +1566,7 @@ class flat_multiset
|
||||
//!
|
||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||
template <class... Args>
|
||||
BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_FWD_REF(Args)... args)
|
||||
inline iterator emplace(BOOST_FWD_REF(Args)... args)
|
||||
{ return this->tree_t::emplace_equal(boost::forward<Args>(args)...); }
|
||||
|
||||
//! <b>Effects</b>: Inserts an object of type Key constructed with
|
||||
@@ -1581,18 +1581,18 @@ class flat_multiset
|
||||
//!
|
||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||
template <class... Args>
|
||||
BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
|
||||
inline iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
|
||||
{ return this->tree_t::emplace_hint_equal(p, boost::forward<Args>(args)...); }
|
||||
|
||||
#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
#define BOOST_CONTAINER_FLAT_MULTISET_EMPLACE_CODE(N) \
|
||||
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
|
||||
BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_MOVE_UREF##N)\
|
||||
inline iterator emplace(BOOST_MOVE_UREF##N)\
|
||||
{ return this->tree_t::emplace_equal(BOOST_MOVE_FWD##N); }\
|
||||
\
|
||||
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
|
||||
BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
||||
inline iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
||||
{ return this->tree_t::emplace_hint_equal(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
|
||||
//
|
||||
BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_FLAT_MULTISET_EMPLACE_CODE)
|
||||
@@ -1658,7 +1658,7 @@ class flat_multiset
|
||||
//!
|
||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||
template <class InputIterator>
|
||||
BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
|
||||
inline void insert(InputIterator first, InputIterator last)
|
||||
{ this->tree_t::insert_equal(first, last); }
|
||||
|
||||
//! <b>Requires</b>: first, last are not iterators into *this and
|
||||
@@ -1671,7 +1671,7 @@ class flat_multiset
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension. If an element is inserted it might invalidate elements.
|
||||
template <class InputIterator>
|
||||
BOOST_CONTAINER_FORCEINLINE void insert(ordered_range_t, InputIterator first, InputIterator last)
|
||||
inline void insert(ordered_range_t, InputIterator first, InputIterator last)
|
||||
{ this->tree_t::insert_equal(ordered_range, first, last); }
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
@@ -1680,7 +1680,7 @@ class flat_multiset
|
||||
//! <b>Complexity</b>: N log(N).
|
||||
//!
|
||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||
BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
|
||||
inline void insert(std::initializer_list<value_type> il)
|
||||
{ this->tree_t::insert_equal(il.begin(), il.end()); }
|
||||
|
||||
//! <b>Requires</b>: Range [il.begin(), il.end()) must be ordered according to the predicate.
|
||||
@@ -1691,28 +1691,28 @@ class flat_multiset
|
||||
//! <b>Complexity</b>: Linear.
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension. If an element is inserted it might invalidate elements.
|
||||
BOOST_CONTAINER_FORCEINLINE void insert(ordered_range_t, std::initializer_list<value_type> il)
|
||||
inline void insert(ordered_range_t, std::initializer_list<value_type> il)
|
||||
{ this->tree_t::insert_equal(ordered_range, il.begin(), il.end()); }
|
||||
#endif
|
||||
|
||||
//! @copydoc ::boost::container::flat_multimap::merge(flat_multimap<Key, T, C2, AllocatorOrContainer>&)
|
||||
template<class C2>
|
||||
BOOST_CONTAINER_FORCEINLINE void merge(flat_multiset<Key, C2, AllocatorOrContainer>& source)
|
||||
inline void merge(flat_multiset<Key, C2, AllocatorOrContainer>& source)
|
||||
{ this->tree_t::merge_equal(source.tree()); }
|
||||
|
||||
//! @copydoc ::boost::container::flat_multiset::merge(flat_multiset<Key, C2, AllocatorOrContainer>&)
|
||||
template<class C2>
|
||||
BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multiset<Key, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
|
||||
inline void merge(BOOST_RV_REF_BEG flat_multiset<Key, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
|
||||
{ return this->merge(static_cast<flat_multiset<Key, C2, AllocatorOrContainer>&>(source)); }
|
||||
|
||||
//! @copydoc ::boost::container::flat_multimap::merge(flat_map<Key, T, C2, AllocatorOrContainer>&)
|
||||
template<class C2>
|
||||
BOOST_CONTAINER_FORCEINLINE void merge(flat_set<Key, C2, AllocatorOrContainer>& source)
|
||||
inline void merge(flat_set<Key, C2, AllocatorOrContainer>& source)
|
||||
{ this->tree_t::merge_equal(source.tree()); }
|
||||
|
||||
//! @copydoc ::boost::container::flat_multiset::merge(flat_set<Key, C2, AllocatorOrContainer>&)
|
||||
template<class C2>
|
||||
BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_set<Key, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
|
||||
inline void merge(BOOST_RV_REF_BEG flat_set<Key, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
|
||||
{ return this->merge(static_cast<flat_set<Key, C2, AllocatorOrContainer>&>(source)); }
|
||||
|
||||
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
@@ -1840,7 +1840,7 @@ class flat_multiset
|
||||
//! <b>Complexity</b>: Assuming O(1) move assignment, O(NlogN) with N = seq.size()
|
||||
//!
|
||||
//! <b>Throws</b>: If the comparison or the move constructor throws
|
||||
BOOST_CONTAINER_FORCEINLINE void adopt_sequence(BOOST_RV_REF(sequence_type) seq)
|
||||
inline void adopt_sequence(BOOST_RV_REF(sequence_type) seq)
|
||||
{ this->tree_t::adopt_sequence_equal(boost::move(seq)); }
|
||||
|
||||
//! <b>Requires</b>: seq shall be ordered according to this->compare()
|
||||
@@ -1851,7 +1851,7 @@ class flat_multiset
|
||||
//! <b>Complexity</b>: Assuming O(1) move assignment, O(1)
|
||||
//!
|
||||
//! <b>Throws</b>: If the move assignment throws
|
||||
BOOST_CONTAINER_FORCEINLINE void adopt_sequence(ordered_range_t, BOOST_RV_REF(sequence_type) seq)
|
||||
inline void adopt_sequence(ordered_range_t, BOOST_RV_REF(sequence_type) seq)
|
||||
{ this->tree_t::adopt_sequence_equal(ordered_range_t(), boost::move(seq)); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const view of the underlying sequence.
|
||||
@@ -1859,7 +1859,7 @@ class flat_multiset
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing
|
||||
BOOST_CONTAINER_FORCEINLINE const sequence_type & sequence() const BOOST_NOEXCEPT
|
||||
inline const sequence_type & sequence() const BOOST_NOEXCEPT
|
||||
{ return this->get_sequence_cref(); }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user