mirror of
https://github.com/boostorg/container.git
synced 2025-08-03 06:24:26 +02:00
Fixed documentation errors with "position", "pos", "hint" and "p" iterators indicating insertion/emplace position.
This commit is contained in:
@@ -1184,14 +1184,14 @@ class deque : protected deque_base<Allocator>
|
||||
}
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: position must be a valid iterator of *this.
|
||||
//! <b>Requires</b>: p must be a valid iterator of *this.
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts an object of type T constructed with
|
||||
//! std::forward<Args>(args)... before position
|
||||
//! std::forward<Args>(args)... before p
|
||||
//!
|
||||
//! <b>Throws</b>: If memory allocation throws or the in-place constructor throws.
|
||||
//!
|
||||
//! <b>Complexity</b>: If position is end(), amortized constant time
|
||||
//! <b>Complexity</b>: If p is end(), amortized constant time
|
||||
//! Linear time otherwise.
|
||||
template <class... Args>
|
||||
iterator emplace(const_iterator p, Args&&... args)
|
||||
@@ -1317,29 +1317,29 @@ class deque : protected deque_base<Allocator>
|
||||
|
||||
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
//! <b>Requires</b>: position must be a valid iterator of *this.
|
||||
//! <b>Requires</b>: p must be a valid iterator of *this.
|
||||
//!
|
||||
//! <b>Effects</b>: Insert a copy of x before position.
|
||||
//! <b>Effects</b>: Insert a copy of x before p.
|
||||
//!
|
||||
//! <b>Returns</b>: an iterator to the inserted element.
|
||||
//!
|
||||
//! <b>Throws</b>: If memory allocation throws or x's copy constructor throws.
|
||||
//!
|
||||
//! <b>Complexity</b>: If position is end(), amortized constant time
|
||||
//! <b>Complexity</b>: If p is end(), amortized constant time
|
||||
//! Linear time otherwise.
|
||||
iterator insert(const_iterator position, const T &x);
|
||||
iterator insert(const_iterator p, const T &x);
|
||||
|
||||
//! <b>Requires</b>: position must be a valid iterator of *this.
|
||||
//! <b>Requires</b>: p must be a valid iterator of *this.
|
||||
//!
|
||||
//! <b>Effects</b>: Insert a new element before position with mx's resources.
|
||||
//! <b>Effects</b>: Insert a new element before p with mx's resources.
|
||||
//!
|
||||
//! <b>Returns</b>: an iterator to the inserted element.
|
||||
//!
|
||||
//! <b>Throws</b>: If memory allocation throws.
|
||||
//!
|
||||
//! <b>Complexity</b>: If position is end(), amortized constant time
|
||||
//! <b>Complexity</b>: If p is end(), amortized constant time
|
||||
//! Linear time otherwise.
|
||||
iterator insert(const_iterator position, T &&x);
|
||||
iterator insert(const_iterator p, T &&x);
|
||||
#else
|
||||
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator, const_iterator)
|
||||
#endif
|
||||
@@ -1441,7 +1441,7 @@ class deque : protected deque_base<Allocator>
|
||||
this->priv_pop_back_aux();
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: Erases the element at position pos.
|
||||
//! <b>Effects</b>: Erases the element at p.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
@@ -1603,19 +1603,19 @@ class deque : protected deque_base<Allocator>
|
||||
{ if (n >= this->size()) throw_out_of_range("deque::at out of range"); }
|
||||
|
||||
template <class U>
|
||||
iterator priv_insert(const_iterator position, BOOST_FWD_REF(U) x)
|
||||
iterator priv_insert(const_iterator p, BOOST_FWD_REF(U) x)
|
||||
{
|
||||
if (position == cbegin()){
|
||||
if (p == cbegin()){
|
||||
this->push_front(::boost::forward<U>(x));
|
||||
return begin();
|
||||
}
|
||||
else if (position == cend()){
|
||||
else if (p == cend()){
|
||||
this->push_back(::boost::forward<U>(x));
|
||||
return --end();
|
||||
}
|
||||
else {
|
||||
return priv_insert_aux_impl
|
||||
( position, (size_type)1
|
||||
( p, (size_type)1
|
||||
, container_detail::get_insert_value_proxy<iterator, Allocator>(::boost::forward<U>(x)));
|
||||
}
|
||||
}
|
||||
|
@@ -658,10 +658,10 @@ class flat_map
|
||||
//! right before p) plus insertion linear to the elements with bigger keys than x.
|
||||
//!
|
||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||
iterator insert(const_iterator position, const value_type& x)
|
||||
iterator insert(const_iterator p, const value_type& x)
|
||||
{
|
||||
return container_detail::force_copy<iterator>(
|
||||
m_flat_tree.insert_unique( container_detail::force_copy<impl_const_iterator>(position)
|
||||
m_flat_tree.insert_unique( container_detail::force_copy<impl_const_iterator>(p)
|
||||
, container_detail::force<impl_value_type>(x)));
|
||||
}
|
||||
|
||||
@@ -674,10 +674,10 @@ class flat_map
|
||||
//! right before p) plus insertion linear to the elements with bigger keys than x.
|
||||
//!
|
||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||
iterator insert(const_iterator position, BOOST_RV_REF(value_type) x)
|
||||
iterator insert(const_iterator p, BOOST_RV_REF(value_type) x)
|
||||
{
|
||||
return container_detail::force_copy<iterator>
|
||||
(m_flat_tree.insert_unique( container_detail::force_copy<impl_const_iterator>(position)
|
||||
(m_flat_tree.insert_unique( container_detail::force_copy<impl_const_iterator>(p)
|
||||
, boost::move(container_detail::force<impl_value_type>(x))));
|
||||
}
|
||||
|
||||
@@ -690,10 +690,10 @@ class flat_map
|
||||
//! right before p) plus insertion linear to the elements with bigger keys than x.
|
||||
//!
|
||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||
iterator insert(const_iterator position, BOOST_RV_REF(movable_value_type) x)
|
||||
iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x)
|
||||
{
|
||||
return container_detail::force_copy<iterator>(
|
||||
m_flat_tree.insert_unique(container_detail::force_copy<impl_const_iterator>(position), boost::move(x)));
|
||||
m_flat_tree.insert_unique(container_detail::force_copy<impl_const_iterator>(p), boost::move(x)));
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: first, last are not iterators into *this.
|
||||
@@ -728,20 +728,20 @@ class flat_map
|
||||
void insert(ordered_unique_range_t, InputIterator first, InputIterator last)
|
||||
{ m_flat_tree.insert_unique(ordered_unique_range, first, last); }
|
||||
|
||||
//! <b>Effects</b>: Erases the element pointed to by position.
|
||||
//! <b>Effects</b>: Erases the element pointed to by p.
|
||||
//!
|
||||
//! <b>Returns</b>: Returns an iterator pointing to the element immediately
|
||||
//! following q prior to the element being erased. If no such element exists,
|
||||
//! returns end().
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the elements with keys bigger than position
|
||||
//! <b>Complexity</b>: Linear to the elements with keys bigger than p
|
||||
//!
|
||||
//! <b>Note</b>: Invalidates elements with keys
|
||||
//! not less than the erased element.
|
||||
iterator erase(const_iterator position)
|
||||
iterator erase(const_iterator p)
|
||||
{
|
||||
return container_detail::force_copy<iterator>
|
||||
(m_flat_tree.erase(container_detail::force_copy<impl_const_iterator>(position)));
|
||||
(m_flat_tree.erase(container_detail::force_copy<impl_const_iterator>(p)));
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: Erases all elements in the container with key equivalent to x.
|
||||
@@ -1477,10 +1477,10 @@ class flat_multimap
|
||||
//! to the elements with bigger keys than x.
|
||||
//!
|
||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||
iterator insert(const_iterator position, const value_type& x)
|
||||
iterator insert(const_iterator p, const value_type& x)
|
||||
{
|
||||
return container_detail::force_copy<iterator>
|
||||
(m_flat_tree.insert_equal( container_detail::force_copy<impl_const_iterator>(position)
|
||||
(m_flat_tree.insert_equal( container_detail::force_copy<impl_const_iterator>(p)
|
||||
, container_detail::force<impl_value_type>(x)));
|
||||
}
|
||||
|
||||
@@ -1495,10 +1495,10 @@ class flat_multimap
|
||||
//! to the elements with bigger keys than x.
|
||||
//!
|
||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||
iterator insert(const_iterator position, BOOST_RV_REF(value_type) x)
|
||||
iterator insert(const_iterator p, BOOST_RV_REF(value_type) x)
|
||||
{
|
||||
return container_detail::force_copy<iterator>
|
||||
(m_flat_tree.insert_equal(container_detail::force_copy<impl_const_iterator>(position)
|
||||
(m_flat_tree.insert_equal(container_detail::force_copy<impl_const_iterator>(p)
|
||||
, boost::move(x)));
|
||||
}
|
||||
|
||||
@@ -1513,10 +1513,10 @@ class flat_multimap
|
||||
//! to the elements with bigger keys than x.
|
||||
//!
|
||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||
iterator insert(const_iterator position, BOOST_RV_REF(impl_value_type) x)
|
||||
iterator insert(const_iterator p, BOOST_RV_REF(impl_value_type) x)
|
||||
{
|
||||
return container_detail::force_copy<iterator>(
|
||||
m_flat_tree.insert_equal(container_detail::force_copy<impl_const_iterator>(position), boost::move(x)));
|
||||
m_flat_tree.insert_equal(container_detail::force_copy<impl_const_iterator>(p), boost::move(x)));
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: first, last are not iterators into *this.
|
||||
@@ -1549,20 +1549,20 @@ class flat_multimap
|
||||
void insert(ordered_range_t, InputIterator first, InputIterator last)
|
||||
{ m_flat_tree.insert_equal(ordered_range, first, last); }
|
||||
|
||||
//! <b>Effects</b>: Erases the element pointed to by position.
|
||||
//! <b>Effects</b>: Erases the element pointed to by p.
|
||||
//!
|
||||
//! <b>Returns</b>: Returns an iterator pointing to the element immediately
|
||||
//! following q prior to the element being erased. If no such element exists,
|
||||
//! returns end().
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the elements with keys bigger than position
|
||||
//! <b>Complexity</b>: Linear to the elements with keys bigger than p
|
||||
//!
|
||||
//! <b>Note</b>: Invalidates elements with keys
|
||||
//! not less than the erased element.
|
||||
iterator erase(const_iterator position)
|
||||
iterator erase(const_iterator p)
|
||||
{
|
||||
return container_detail::force_copy<iterator>(
|
||||
m_flat_tree.erase(container_detail::force_copy<impl_const_iterator>(position)));
|
||||
m_flat_tree.erase(container_detail::force_copy<impl_const_iterator>(p)));
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: Erases all elements in the container with key equivalent to x.
|
||||
|
@@ -394,8 +394,8 @@ class flat_set
|
||||
//!
|
||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||
template <class... Args>
|
||||
iterator emplace_hint(const_iterator hint, Args&&... args)
|
||||
{ return this->base_t::emplace_hint_unique(hint, boost::forward<Args>(args)...); }
|
||||
iterator emplace_hint(const_iterator p, Args&&... args)
|
||||
{ return this->base_t::emplace_hint_unique(p, boost::forward<Args>(args)...); }
|
||||
|
||||
#else //#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
|
||||
|
||||
@@ -405,10 +405,10 @@ class flat_set
|
||||
{ return this->base_t::emplace_unique(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); }\
|
||||
\
|
||||
BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
|
||||
iterator emplace_hint(const_iterator hint \
|
||||
iterator emplace_hint(const_iterator p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
|
||||
{ return this->base_t::emplace_hint_unique \
|
||||
(hint BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); } \
|
||||
(p BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); } \
|
||||
//!
|
||||
#define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
|
||||
#include BOOST_PP_LOCAL_ITERATE()
|
||||
@@ -471,7 +471,7 @@ class flat_set
|
||||
//! right before p) plus insertion linear to the elements with bigger keys than x.
|
||||
//!
|
||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||
iterator insert(const_iterator position, value_type &&x);
|
||||
iterator insert(const_iterator p, value_type &&x);
|
||||
#else
|
||||
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator, const_iterator)
|
||||
#endif
|
||||
@@ -506,17 +506,17 @@ class flat_set
|
||||
|
||||
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
//! <b>Effects</b>: Erases the element pointed to by position.
|
||||
//! <b>Effects</b>: Erases the element pointed to by p.
|
||||
//!
|
||||
//! <b>Returns</b>: Returns an iterator pointing to the element immediately
|
||||
//! following q prior to the element being erased. If no such element exists,
|
||||
//! returns end().
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the elements with keys bigger than position
|
||||
//! <b>Complexity</b>: Linear to the elements with keys bigger than p
|
||||
//!
|
||||
//! <b>Note</b>: Invalidates elements with keys
|
||||
//! not less than the erased element.
|
||||
iterator erase(const_iterator position);
|
||||
iterator erase(const_iterator p);
|
||||
|
||||
//! <b>Effects</b>: Erases all elements in the container with key equivalent to x.
|
||||
//!
|
||||
@@ -912,8 +912,8 @@ class flat_multiset
|
||||
//!
|
||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||
template <class... Args>
|
||||
iterator emplace_hint(const_iterator hint, Args&&... args)
|
||||
{ return this->base_t::emplace_hint_equal(hint, boost::forward<Args>(args)...); }
|
||||
iterator emplace_hint(const_iterator p, Args&&... args)
|
||||
{ return this->base_t::emplace_hint_equal(p, boost::forward<Args>(args)...); }
|
||||
|
||||
#else //#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
|
||||
|
||||
@@ -923,10 +923,10 @@ class flat_multiset
|
||||
{ return this->base_t::emplace_equal(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); } \
|
||||
\
|
||||
BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
|
||||
iterator emplace_hint(const_iterator hint \
|
||||
iterator emplace_hint(const_iterator p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
|
||||
{ return this->base_t::emplace_hint_equal \
|
||||
(hint BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); } \
|
||||
(p BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); } \
|
||||
//!
|
||||
#define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
|
||||
#include BOOST_PP_LOCAL_ITERATE()
|
||||
@@ -978,7 +978,7 @@ class flat_multiset
|
||||
//! right before p) plus insertion linear to the elements with bigger keys than x.
|
||||
//!
|
||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||
iterator insert(const_iterator position, value_type &&x);
|
||||
iterator insert(const_iterator p, value_type &&x);
|
||||
#else
|
||||
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator, const_iterator)
|
||||
#endif
|
||||
@@ -1012,7 +1012,7 @@ class flat_multiset
|
||||
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::erase(const_iterator)
|
||||
iterator erase(const_iterator position);
|
||||
iterator erase(const_iterator p);
|
||||
|
||||
//! @copydoc ::boost::container::flat_set::erase(const key_type&)
|
||||
size_type erase(const key_type& x);
|
||||
|
@@ -766,27 +766,27 @@ class list
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
//! <b>Requires</b>: position must be a valid iterator of *this.
|
||||
//! <b>Requires</b>: p must be a valid iterator of *this.
|
||||
//!
|
||||
//! <b>Effects</b>: Insert a copy of x before position.
|
||||
//! <b>Effects</b>: Insert a copy of x before p.
|
||||
//!
|
||||
//! <b>Returns</b>: an iterator to the inserted element.
|
||||
//!
|
||||
//! <b>Throws</b>: If memory allocation throws or x's copy constructor throws.
|
||||
//!
|
||||
//! <b>Complexity</b>: Amortized constant time.
|
||||
iterator insert(const_iterator position, const T &x);
|
||||
iterator insert(const_iterator p, const T &x);
|
||||
|
||||
//! <b>Requires</b>: position must be a valid iterator of *this.
|
||||
//! <b>Requires</b>: p must be a valid iterator of *this.
|
||||
//!
|
||||
//! <b>Effects</b>: Insert a new element before position with mx's resources.
|
||||
//! <b>Effects</b>: Insert a new element before p with mx's resources.
|
||||
//!
|
||||
//! <b>Returns</b>: an iterator to the inserted element.
|
||||
//!
|
||||
//! <b>Throws</b>: If memory allocation throws.
|
||||
//!
|
||||
//! <b>Complexity</b>: Amortized constant time.
|
||||
iterator insert(const_iterator position, T &&x);
|
||||
iterator insert(const_iterator p, T &&x);
|
||||
#else
|
||||
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator, const_iterator)
|
||||
#endif
|
||||
|
@@ -496,8 +496,8 @@ class map
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
|
||||
//! is inserted right before p.
|
||||
iterator insert(const_iterator position, const value_type& x)
|
||||
{ return this->base_t::insert_unique(position, x); }
|
||||
iterator insert(const_iterator p, const value_type& x)
|
||||
{ return this->base_t::insert_unique(p, x); }
|
||||
|
||||
//! <b>Effects</b>: Move constructs a new value from x if and only if there is
|
||||
//! no element in the container with key equivalent to the key of x.
|
||||
@@ -508,8 +508,8 @@ class map
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
|
||||
//! is inserted right before p.
|
||||
iterator insert(const_iterator position, BOOST_RV_REF(nonconst_value_type) x)
|
||||
{ return this->base_t::insert_unique(position, boost::move(x)); }
|
||||
iterator insert(const_iterator p, BOOST_RV_REF(nonconst_value_type) x)
|
||||
{ return this->base_t::insert_unique(p, boost::move(x)); }
|
||||
|
||||
//! <b>Effects</b>: Move constructs a new value from x if and only if there is
|
||||
//! no element in the container with key equivalent to the key of x.
|
||||
@@ -520,8 +520,8 @@ class map
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
|
||||
//! is inserted right before p.
|
||||
iterator insert(const_iterator position, BOOST_RV_REF(movable_value_type) x)
|
||||
{ return this->base_t::insert_unique(position, boost::move(x)); }
|
||||
iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x)
|
||||
{ return this->base_t::insert_unique(p, boost::move(x)); }
|
||||
|
||||
//! <b>Effects</b>: Inserts a copy of x in the container.
|
||||
//! p is a hint pointing to where the insert should start to search.
|
||||
@@ -529,8 +529,8 @@ class map
|
||||
//! <b>Returns</b>: An iterator pointing to the element with key equivalent to the key of x.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
iterator insert(const_iterator position, const nonconst_value_type& x)
|
||||
{ return this->base_t::insert_unique(position, x); }
|
||||
iterator insert(const_iterator p, const nonconst_value_type& x)
|
||||
{ return this->base_t::insert_unique(p, x); }
|
||||
|
||||
//! <b>Effects</b>: Inserts an element move constructed from x in the container.
|
||||
//! p is a hint pointing to where the insert should start to search.
|
||||
@@ -538,8 +538,8 @@ class map
|
||||
//! <b>Returns</b>: An iterator pointing to the element with key equivalent to the key of x.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
iterator insert(const_iterator position, BOOST_RV_REF(value_type) x)
|
||||
{ return this->base_t::insert_unique(position, boost::move(x)); }
|
||||
iterator insert(const_iterator p, BOOST_RV_REF(value_type) x)
|
||||
{ return this->base_t::insert_unique(p, boost::move(x)); }
|
||||
|
||||
//! <b>Requires</b>: first, last are not iterators into *this.
|
||||
//!
|
||||
@@ -579,8 +579,8 @@ class map
|
||||
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
|
||||
//! is inserted right before p.
|
||||
template <class... Args>
|
||||
iterator emplace_hint(const_iterator hint, Args&&... args)
|
||||
{ return this->base_t::emplace_hint_unique(hint, boost::forward<Args>(args)...); }
|
||||
iterator emplace_hint(const_iterator p, Args&&... args)
|
||||
{ return this->base_t::emplace_hint_unique(p, boost::forward<Args>(args)...); }
|
||||
|
||||
#else //#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
|
||||
|
||||
@@ -590,9 +590,9 @@ class map
|
||||
{ return this->base_t::emplace_unique(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); }\
|
||||
\
|
||||
BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
|
||||
iterator emplace_hint(const_iterator hint \
|
||||
iterator emplace_hint(const_iterator p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
|
||||
{ return this->base_t::emplace_hint_unique(hint \
|
||||
{ return this->base_t::emplace_hint_unique(p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _));} \
|
||||
//!
|
||||
#define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
|
||||
@@ -602,14 +602,14 @@ class map
|
||||
|
||||
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
//! <b>Effects</b>: Erases the element pointed to by position.
|
||||
//! <b>Effects</b>: Erases the element pointed to by p.
|
||||
//!
|
||||
//! <b>Returns</b>: Returns an iterator pointing to the element immediately
|
||||
//! following q prior to the element being erased. If no such element exists,
|
||||
//! returns end().
|
||||
//!
|
||||
//! <b>Complexity</b>: Amortized constant time
|
||||
iterator erase(const_iterator position) BOOST_CONTAINER_NOEXCEPT;
|
||||
iterator erase(const_iterator p) BOOST_CONTAINER_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Erases all elements in the container with key equivalent to x.
|
||||
//!
|
||||
@@ -1074,8 +1074,8 @@ class multimap
|
||||
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
|
||||
//! is inserted right before p.
|
||||
template <class... Args>
|
||||
iterator emplace_hint(const_iterator hint, Args&&... args)
|
||||
{ return this->base_t::emplace_hint_equal(hint, boost::forward<Args>(args)...); }
|
||||
iterator emplace_hint(const_iterator p, Args&&... args)
|
||||
{ return this->base_t::emplace_hint_equal(p, boost::forward<Args>(args)...); }
|
||||
|
||||
#else //#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
|
||||
|
||||
@@ -1085,9 +1085,9 @@ class multimap
|
||||
{ return this->base_t::emplace_equal(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); } \
|
||||
\
|
||||
BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
|
||||
iterator emplace_hint(const_iterator hint \
|
||||
iterator emplace_hint(const_iterator p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
|
||||
{ return this->base_t::emplace_hint_equal(hint \
|
||||
{ return this->base_t::emplace_hint_equal(p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _));} \
|
||||
//!
|
||||
#define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
|
||||
@@ -1131,8 +1131,8 @@ class multimap
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
|
||||
//! is inserted right before p.
|
||||
iterator insert(const_iterator position, const value_type& x)
|
||||
{ return this->base_t::insert_equal(position, x); }
|
||||
iterator insert(const_iterator p, const value_type& x)
|
||||
{ return this->base_t::insert_equal(p, x); }
|
||||
|
||||
//! <b>Effects</b>: Inserts a new value constructed from x in the container.
|
||||
//! p is a hint pointing to where the insert should start to search.
|
||||
@@ -1142,8 +1142,8 @@ class multimap
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
|
||||
//! is inserted right before p.
|
||||
iterator insert(const_iterator position, const nonconst_value_type& x)
|
||||
{ return this->base_t::insert_equal(position, x); }
|
||||
iterator insert(const_iterator p, const nonconst_value_type& x)
|
||||
{ return this->base_t::insert_equal(p, x); }
|
||||
|
||||
//! <b>Effects</b>: Inserts a new value move constructed from x in the container.
|
||||
//! p is a hint pointing to where the insert should start to search.
|
||||
@@ -1153,8 +1153,8 @@ class multimap
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
|
||||
//! is inserted right before p.
|
||||
iterator insert(const_iterator position, BOOST_RV_REF(nonconst_value_type) x)
|
||||
{ return this->base_t::insert_equal(position, boost::move(x)); }
|
||||
iterator insert(const_iterator p, BOOST_RV_REF(nonconst_value_type) x)
|
||||
{ return this->base_t::insert_equal(p, boost::move(x)); }
|
||||
|
||||
//! <b>Effects</b>: Inserts a new value move constructed from x in the container.
|
||||
//! p is a hint pointing to where the insert should start to search.
|
||||
@@ -1164,8 +1164,8 @@ class multimap
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
|
||||
//! is inserted right before p.
|
||||
iterator insert(const_iterator position, BOOST_RV_REF(movable_value_type) x)
|
||||
{ return this->base_t::insert_equal(position, boost::move(x)); }
|
||||
iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x)
|
||||
{ return this->base_t::insert_equal(p, boost::move(x)); }
|
||||
|
||||
//! <b>Requires</b>: first, last are not iterators into *this.
|
||||
//!
|
||||
|
@@ -363,8 +363,8 @@ class set
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
template <class... Args>
|
||||
iterator emplace_hint(const_iterator hint, Args&&... args)
|
||||
{ return this->base_t::emplace_hint_unique(hint, boost::forward<Args>(args)...); }
|
||||
iterator emplace_hint(const_iterator p, Args&&... args)
|
||||
{ return this->base_t::emplace_hint_unique(p, boost::forward<Args>(args)...); }
|
||||
|
||||
#else //#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
|
||||
|
||||
@@ -374,9 +374,9 @@ class set
|
||||
{ return this->base_t::emplace_unique(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); }\
|
||||
\
|
||||
BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
|
||||
iterator emplace_hint(const_iterator hint \
|
||||
iterator emplace_hint(const_iterator p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
|
||||
{ return this->base_t::emplace_hint_unique(hint \
|
||||
{ return this->base_t::emplace_hint_unique(p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _));} \
|
||||
//!
|
||||
#define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
|
||||
@@ -429,7 +429,7 @@ class set
|
||||
//! <b>Returns</b>: An iterator pointing to the element with key equivalent to the key of x.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
iterator insert(const_iterator position, value_type &&x);
|
||||
iterator insert(const_iterator p, value_type &&x);
|
||||
#else
|
||||
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator, const_iterator)
|
||||
#endif
|
||||
@@ -851,8 +851,8 @@ class multiset
|
||||
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
|
||||
//! is inserted right before p.
|
||||
template <class... Args>
|
||||
iterator emplace_hint(const_iterator hint, Args&&... args)
|
||||
{ return this->base_t::emplace_hint_equal(hint, boost::forward<Args>(args)...); }
|
||||
iterator emplace_hint(const_iterator p, Args&&... args)
|
||||
{ return this->base_t::emplace_hint_equal(p, boost::forward<Args>(args)...); }
|
||||
|
||||
#else //#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
|
||||
|
||||
@@ -862,9 +862,9 @@ class multiset
|
||||
{ return this->base_t::emplace_equal(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); } \
|
||||
\
|
||||
BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
|
||||
iterator emplace_hint(const_iterator hint \
|
||||
iterator emplace_hint(const_iterator p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
|
||||
{ return this->base_t::emplace_hint_equal(hint \
|
||||
{ return this->base_t::emplace_hint_equal(p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _));} \
|
||||
//!
|
||||
#define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
|
||||
@@ -910,7 +910,7 @@ class multiset
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
|
||||
//! is inserted right before p.
|
||||
iterator insert(const_iterator position, value_type &&x);
|
||||
iterator insert(const_iterator p, value_type &&x);
|
||||
#else
|
||||
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator, const_iterator)
|
||||
#endif
|
||||
|
@@ -736,8 +736,7 @@ class slist
|
||||
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
//! <b>Requires</b>: p must be a valid iterator of *this.
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts a copy of the value after the position pointed
|
||||
//! by prev_p.
|
||||
//! <b>Effects</b>: Inserts a copy of the value after prev_p.
|
||||
//!
|
||||
//! <b>Returns</b>: An iterator to the inserted element.
|
||||
//!
|
||||
@@ -747,12 +746,12 @@ class slist
|
||||
//!
|
||||
//! <b>Note</b>: Does not affect the validity of iterators and references of
|
||||
//! previous values.
|
||||
iterator insert_after(const_iterator prev_pos, const T &x);
|
||||
iterator insert_after(const_iterator prev_p, const T &x);
|
||||
|
||||
//! <b>Requires</b>: prev_pos must be a valid iterator of *this.
|
||||
//! <b>Requires</b>: prev_p must be a valid iterator of *this.
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts a move constructed copy object from the value after the
|
||||
//! p pointed by prev_pos.
|
||||
//! p pointed by prev_p.
|
||||
//!
|
||||
//! <b>Returns</b>: An iterator to the inserted element.
|
||||
//!
|
||||
@@ -762,16 +761,16 @@ class slist
|
||||
//!
|
||||
//! <b>Note</b>: Does not affect the validity of iterators and references of
|
||||
//! previous values.
|
||||
iterator insert_after(const_iterator prev_pos, T &&x);
|
||||
iterator insert_after(const_iterator prev_p, T &&x);
|
||||
#else
|
||||
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert_after, T, iterator, priv_insert_after, const_iterator, const_iterator)
|
||||
#endif
|
||||
|
||||
//! <b>Requires</b>: prev_pos must be a valid iterator of *this.
|
||||
//! <b>Requires</b>: prev_p must be a valid iterator of *this.
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts n copies of x after prev_pos.
|
||||
//! <b>Effects</b>: Inserts n copies of x after prev_p.
|
||||
//!
|
||||
//! <b>Returns</b>: an iterator to the last inserted element or prev_pos if n is 0.
|
||||
//! <b>Returns</b>: an iterator to the last inserted element or prev_p if n is 0.
|
||||
//!
|
||||
//! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
|
||||
//!
|
||||
@@ -780,18 +779,17 @@ class slist
|
||||
//!
|
||||
//! <b>Note</b>: Does not affect the validity of iterators and references of
|
||||
//! previous values.
|
||||
iterator insert_after(const_iterator prev_pos, size_type n, const value_type& x)
|
||||
iterator insert_after(const_iterator prev_p, size_type n, const value_type& x)
|
||||
{
|
||||
typedef constant_iterator<value_type, difference_type> cvalue_iterator;
|
||||
return this->insert_after(prev_pos, cvalue_iterator(x, n), cvalue_iterator());
|
||||
return this->insert_after(prev_p, cvalue_iterator(x, n), cvalue_iterator());
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: prev_pos must be a valid iterator of *this.
|
||||
//! <b>Requires</b>: prev_p must be a valid iterator of *this.
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts the range pointed by [first, last)
|
||||
//! after the position prev_pos.
|
||||
//! <b>Effects</b>: Inserts the range pointed by [first, last) after prev_p.
|
||||
//!
|
||||
//! <b>Returns</b>: an iterator to the last inserted element or prev_pos if first == last.
|
||||
//! <b>Returns</b>: an iterator to the last inserted element or prev_p if first == last.
|
||||
//!
|
||||
//! <b>Throws</b>: If memory allocation throws, T's constructor from a
|
||||
//! dereferenced InpIt throws.
|
||||
@@ -801,7 +799,7 @@ class slist
|
||||
//! <b>Note</b>: Does not affect the validity of iterators and references of
|
||||
//! previous values.
|
||||
template <class InpIt>
|
||||
iterator insert_after(const_iterator prev_pos, InpIt first, InpIt last
|
||||
iterator insert_after(const_iterator prev_p, InpIt first, InpIt last
|
||||
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
, typename container_detail::enable_if_c
|
||||
< !container_detail::is_convertible<InpIt, size_type>::value
|
||||
@@ -812,7 +810,7 @@ class slist
|
||||
#endif
|
||||
)
|
||||
{
|
||||
iterator ret_it(prev_pos.get());
|
||||
iterator ret_it(prev_p.get());
|
||||
for (; first != last; ++first){
|
||||
ret_it = iterator(this->icont().insert_after(ret_it.get(), *this->create_node_from_it(first)));
|
||||
}
|
||||
@@ -845,7 +843,7 @@ class slist
|
||||
void pop_front()
|
||||
{ this->icont().pop_front_and_dispose(Destroyer(this->node_alloc())); }
|
||||
|
||||
//! <b>Effects</b>: Erases the element after the element pointed by prev_pos
|
||||
//! <b>Effects</b>: Erases the element after the element pointed by prev_p
|
||||
//! of the list.
|
||||
//!
|
||||
//! <b>Returns</b>: the first element remaining beyond the removed elements,
|
||||
@@ -856,9 +854,9 @@ class slist
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Does not invalidate iterators or references to non erased elements.
|
||||
iterator erase_after(const_iterator prev_pos)
|
||||
iterator erase_after(const_iterator prev_p)
|
||||
{
|
||||
return iterator(this->icont().erase_after_and_dispose(prev_pos.get(), Destroyer(this->node_alloc())));
|
||||
return iterator(this->icont().erase_after_and_dispose(prev_p.get(), Destroyer(this->node_alloc())));
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: Erases the range (before_first, last) from
|
||||
@@ -912,11 +910,11 @@ class slist
|
||||
//!
|
||||
//! <b>Note</b>: Iterators of values obtained from list x now point to elements of
|
||||
//! this list. Iterators of this list and all the references are not invalidated.
|
||||
void splice_after(const_iterator prev_pos, slist& x) BOOST_CONTAINER_NOEXCEPT
|
||||
void splice_after(const_iterator prev_p, slist& x) BOOST_CONTAINER_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT(this != &x);
|
||||
BOOST_ASSERT(this->node_alloc() == x.node_alloc());
|
||||
this->icont().splice_after(prev_pos.get(), x.icont());
|
||||
this->icont().splice_after(prev_p.get(), x.icont());
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: p must point to an element contained
|
||||
@@ -932,16 +930,16 @@ class slist
|
||||
//!
|
||||
//! <b>Note</b>: Iterators of values obtained from list x now point to elements of
|
||||
//! this list. Iterators of this list and all the references are not invalidated.
|
||||
void splice_after(const_iterator prev_pos, BOOST_RV_REF(slist) x) BOOST_CONTAINER_NOEXCEPT
|
||||
{ this->splice_after(prev_pos, static_cast<slist&>(x)); }
|
||||
void splice_after(const_iterator prev_p, BOOST_RV_REF(slist) x) BOOST_CONTAINER_NOEXCEPT
|
||||
{ this->splice_after(prev_p, static_cast<slist&>(x)); }
|
||||
|
||||
//! <b>Requires</b>: prev_pos must be a valid iterator of this.
|
||||
//! <b>Requires</b>: prev_p must be a valid iterator of this.
|
||||
//! i must point to an element contained in list x.
|
||||
//! this' allocator and x's allocator shall compare equal.
|
||||
//!
|
||||
//! <b>Effects</b>: Transfers the value pointed by i, from list x to this list,
|
||||
//! after the element pointed by prev_pos.
|
||||
//! If prev_pos == prev or prev_pos == ++prev, this function is a null operation.
|
||||
//! after the element pointed by prev_p.
|
||||
//! If prev_p == prev or prev_p == ++prev, this function is a null operation.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
@@ -949,19 +947,19 @@ class slist
|
||||
//!
|
||||
//! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
|
||||
//! list. Iterators of this list and all the references are not invalidated.
|
||||
void splice_after(const_iterator prev_pos, slist& x, const_iterator prev) BOOST_CONTAINER_NOEXCEPT
|
||||
void splice_after(const_iterator prev_p, slist& x, const_iterator prev) BOOST_CONTAINER_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT(this->node_alloc() == x.node_alloc());
|
||||
this->icont().splice_after(prev_pos.get(), x.icont(), prev.get());
|
||||
this->icont().splice_after(prev_p.get(), x.icont(), prev.get());
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: prev_pos must be a valid iterator of this.
|
||||
//! <b>Requires</b>: prev_p must be a valid iterator of this.
|
||||
//! i must point to an element contained in list x.
|
||||
//! this' allocator and x's allocator shall compare equal.
|
||||
//!
|
||||
//! <b>Effects</b>: Transfers the value pointed by i, from list x to this list,
|
||||
//! after the element pointed by prev_pos.
|
||||
//! If prev_pos == prev or prev_pos == ++prev, this function is a null operation.
|
||||
//! after the element pointed by prev_p.
|
||||
//! If prev_p == prev or prev_p == ++prev, this function is a null operation.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
@@ -969,16 +967,16 @@ class slist
|
||||
//!
|
||||
//! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
|
||||
//! list. Iterators of this list and all the references are not invalidated.
|
||||
void splice_after(const_iterator prev_pos, BOOST_RV_REF(slist) x, const_iterator prev) BOOST_CONTAINER_NOEXCEPT
|
||||
{ this->splice_after(prev_pos, static_cast<slist&>(x), prev); }
|
||||
void splice_after(const_iterator prev_p, BOOST_RV_REF(slist) x, const_iterator prev) BOOST_CONTAINER_NOEXCEPT
|
||||
{ this->splice_after(prev_p, static_cast<slist&>(x), prev); }
|
||||
|
||||
//! <b>Requires</b>: prev_pos must be a valid iterator of this.
|
||||
//! <b>Requires</b>: prev_p must be a valid iterator of this.
|
||||
//! before_first and before_last must be valid iterators of x.
|
||||
//! prev_pos must not be contained in [before_first, before_last) range.
|
||||
//! prev_p must not be contained in [before_first, before_last) range.
|
||||
//! this' allocator and x's allocator shall compare equal.
|
||||
//!
|
||||
//! <b>Effects</b>: Transfers the range [before_first + 1, before_last + 1)
|
||||
//! from list x to this list, after the element pointed by prev_pos.
|
||||
//! from list x to this list, after the element pointed by prev_p.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
@@ -986,21 +984,21 @@ class slist
|
||||
//!
|
||||
//! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
|
||||
//! list. Iterators of this list and all the references are not invalidated.
|
||||
void splice_after(const_iterator prev_pos, slist& x,
|
||||
void splice_after(const_iterator prev_p, slist& x,
|
||||
const_iterator before_first, const_iterator before_last) BOOST_CONTAINER_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT(this->node_alloc() == x.node_alloc());
|
||||
this->icont().splice_after
|
||||
(prev_pos.get(), x.icont(), before_first.get(), before_last.get());
|
||||
(prev_p.get(), x.icont(), before_first.get(), before_last.get());
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: prev_pos must be a valid iterator of this.
|
||||
//! <b>Requires</b>: prev_p must be a valid iterator of this.
|
||||
//! before_first and before_last must be valid iterators of x.
|
||||
//! prev_pos must not be contained in [before_first, before_last) range.
|
||||
//! prev_p must not be contained in [before_first, before_last) range.
|
||||
//! this' allocator and x's allocator shall compare equal.
|
||||
//!
|
||||
//! <b>Effects</b>: Transfers the range [before_first + 1, before_last + 1)
|
||||
//! from list x to this list, after the element pointed by prev_pos.
|
||||
//! from list x to this list, after the element pointed by prev_p.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
@@ -1008,18 +1006,18 @@ class slist
|
||||
//!
|
||||
//! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
|
||||
//! list. Iterators of this list and all the references are not invalidated.
|
||||
void splice_after(const_iterator prev_pos, BOOST_RV_REF(slist) x,
|
||||
void splice_after(const_iterator prev_p, BOOST_RV_REF(slist) x,
|
||||
const_iterator before_first, const_iterator before_last) BOOST_CONTAINER_NOEXCEPT
|
||||
{ this->splice_after(prev_pos, static_cast<slist&>(x), before_first, before_last); }
|
||||
{ this->splice_after(prev_p, static_cast<slist&>(x), before_first, before_last); }
|
||||
|
||||
//! <b>Requires</b>: prev_pos must be a valid iterator of this.
|
||||
//! <b>Requires</b>: prev_p must be a valid iterator of this.
|
||||
//! before_first and before_last must be valid iterators of x.
|
||||
//! prev_pos must not be contained in [before_first, before_last) range.
|
||||
//! prev_p must not be contained in [before_first, before_last) range.
|
||||
//! n == std::distance(before_first, before_last).
|
||||
//! this' allocator and x's allocator shall compare equal.
|
||||
//!
|
||||
//! <b>Effects</b>: Transfers the range [before_first + 1, before_last + 1)
|
||||
//! from list x to this list, after the element pointed by prev_pos.
|
||||
//! from list x to this list, after the element pointed by prev_p.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
@@ -1027,23 +1025,23 @@ class slist
|
||||
//!
|
||||
//! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
|
||||
//! list. Iterators of this list and all the references are not invalidated.
|
||||
void splice_after(const_iterator prev_pos, slist& x,
|
||||
void splice_after(const_iterator prev_p, slist& x,
|
||||
const_iterator before_first, const_iterator before_last,
|
||||
size_type n) BOOST_CONTAINER_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT(this->node_alloc() == x.node_alloc());
|
||||
this->icont().splice_after
|
||||
(prev_pos.get(), x.icont(), before_first.get(), before_last.get(), n);
|
||||
(prev_p.get(), x.icont(), before_first.get(), before_last.get(), n);
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: prev_pos must be a valid iterator of this.
|
||||
//! <b>Requires</b>: prev_p must be a valid iterator of this.
|
||||
//! before_first and before_last must be valid iterators of x.
|
||||
//! prev_pos must not be contained in [before_first, before_last) range.
|
||||
//! prev_p must not be contained in [before_first, before_last) range.
|
||||
//! n == std::distance(before_first, before_last).
|
||||
//! this' allocator and x's allocator shall compare equal.
|
||||
//!
|
||||
//! <b>Effects</b>: Transfers the range [before_first + 1, before_last + 1)
|
||||
//! from list x to this list, after the element pointed by prev_pos.
|
||||
//! from list x to this list, after the element pointed by prev_p.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing
|
||||
//!
|
||||
@@ -1051,10 +1049,10 @@ class slist
|
||||
//!
|
||||
//! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
|
||||
//! list. Iterators of this list and all the references are not invalidated.
|
||||
void splice_after(const_iterator prev_pos, BOOST_RV_REF(slist) x,
|
||||
void splice_after(const_iterator prev_p, BOOST_RV_REF(slist) x,
|
||||
const_iterator before_first, const_iterator before_last,
|
||||
size_type n) BOOST_CONTAINER_NOEXCEPT
|
||||
{ this->splice_after(prev_pos, static_cast<slist&>(x), before_first, before_last, n); }
|
||||
{ this->splice_after(prev_p, static_cast<slist&>(x), before_first, before_last, n); }
|
||||
|
||||
//! <b>Effects</b>: Removes all the elements that compare equal to value.
|
||||
//!
|
||||
@@ -1264,7 +1262,7 @@ class slist
|
||||
//! <b>Throws</b>: If memory allocation throws or x's copy constructor throws.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the elements before p.
|
||||
iterator insert(const_iterator position, const T &x);
|
||||
iterator insert(const_iterator p, const T &x);
|
||||
|
||||
//! <b>Requires</b>: p must be a valid iterator of *this.
|
||||
//!
|
||||
@@ -1275,7 +1273,7 @@ class slist
|
||||
//! <b>Throws</b>: If memory allocation throws.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the elements before p.
|
||||
iterator insert(const_iterator prev_pos, T &&x);
|
||||
iterator insert(const_iterator prev_p, T &&x);
|
||||
#else
|
||||
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator, const_iterator)
|
||||
#endif
|
||||
@@ -1521,8 +1519,8 @@ class slist
|
||||
{ return this->insert_after(previous(p), ::boost::forward<U>(x)); }
|
||||
|
||||
template<class U>
|
||||
iterator priv_insert_after(const_iterator prev_pos, BOOST_FWD_REF(U) x)
|
||||
{ return iterator(this->icont().insert_after(prev_pos.get(), *this->create_node(::boost::forward<U>(x)))); }
|
||||
iterator priv_insert_after(const_iterator prev_p, BOOST_FWD_REF(U) x)
|
||||
{ return iterator(this->icont().insert_after(prev_p.get(), *this->create_node(::boost::forward<U>(x)))); }
|
||||
|
||||
class insertion_functor;
|
||||
friend class insertion_functor;
|
||||
|
@@ -1223,24 +1223,23 @@ class stable_vector
|
||||
this->insert(this->cend(), EmplaceIterator(ef), EmplaceIterator());
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: position must be a valid iterator of *this.
|
||||
//! <b>Requires</b>: p must be a valid iterator of *this.
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts an object of type T constructed with
|
||||
//! std::forward<Args>(args)... before position
|
||||
//! std::forward<Args>(args)... before p
|
||||
//!
|
||||
//! <b>Throws</b>: If memory allocation throws or the in-place constructor throws.
|
||||
//!
|
||||
//! <b>Complexity</b>: If position is end(), amortized constant time
|
||||
//! <b>Complexity</b>: If p is end(), amortized constant time
|
||||
//! Linear time otherwise.
|
||||
template<class ...Args>
|
||||
iterator emplace(const_iterator position, Args && ...args)
|
||||
iterator emplace(const_iterator p, Args && ...args)
|
||||
{
|
||||
//Just call more general insert(pos, size, value) and return iterator
|
||||
size_type pos_n = position - cbegin();
|
||||
size_type pos_n = p - cbegin();
|
||||
typedef emplace_functor<Args...> EmplaceFunctor;
|
||||
typedef emplace_iterator<value_type, EmplaceFunctor, difference_type> EmplaceIterator;
|
||||
EmplaceFunctor &&ef = EmplaceFunctor(boost::forward<Args>(args)...);
|
||||
this->insert(position, EmplaceIterator(ef), EmplaceIterator());
|
||||
this->insert(p, EmplaceIterator(ef), EmplaceIterator());
|
||||
return iterator(this->begin() + pos_n);
|
||||
}
|
||||
|
||||
@@ -1261,7 +1260,7 @@ class stable_vector
|
||||
} \
|
||||
\
|
||||
BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
|
||||
iterator emplace(const_iterator pos \
|
||||
iterator emplace(const_iterator p \
|
||||
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
|
||||
{ \
|
||||
typedef BOOST_PP_CAT(BOOST_PP_CAT(emplace_functor, n), arg) \
|
||||
@@ -1271,8 +1270,8 @@ class stable_vector
|
||||
EmplaceFunctor ef BOOST_PP_LPAREN_IF(n) \
|
||||
BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) \
|
||||
BOOST_PP_RPAREN_IF(n); \
|
||||
size_type pos_n = pos - this->cbegin(); \
|
||||
this->insert(pos, EmplaceIterator(ef), EmplaceIterator()); \
|
||||
size_type pos_n = p - this->cbegin(); \
|
||||
this->insert(p, EmplaceIterator(ef), EmplaceIterator()); \
|
||||
return iterator(this->begin() + pos_n); \
|
||||
} \
|
||||
//!
|
||||
@@ -1302,61 +1301,61 @@ class stable_vector
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
//! <b>Requires</b>: position must be a valid iterator of *this.
|
||||
//! <b>Requires</b>: p must be a valid iterator of *this.
|
||||
//!
|
||||
//! <b>Effects</b>: Insert a copy of x before position.
|
||||
//! <b>Effects</b>: Insert a copy of x before p.
|
||||
//!
|
||||
//! <b>Returns</b>: An iterator to the inserted element.
|
||||
//!
|
||||
//! <b>Throws</b>: If memory allocation throws or x's copy constructor throws.
|
||||
//!
|
||||
//! <b>Complexity</b>: If position is end(), amortized constant time
|
||||
//! <b>Complexity</b>: If p is end(), amortized constant time
|
||||
//! Linear time otherwise.
|
||||
iterator insert(const_iterator position, const T &x);
|
||||
iterator insert(const_iterator p, const T &x);
|
||||
|
||||
//! <b>Requires</b>: position must be a valid iterator of *this.
|
||||
//! <b>Requires</b>: p must be a valid iterator of *this.
|
||||
//!
|
||||
//! <b>Effects</b>: Insert a new element before position with mx's resources.
|
||||
//! <b>Effects</b>: Insert a new element before p with mx's resources.
|
||||
//!
|
||||
//! <b>Returns</b>: an iterator to the inserted element.
|
||||
//!
|
||||
//! <b>Throws</b>: If memory allocation throws.
|
||||
//!
|
||||
//! <b>Complexity</b>: If position is end(), amortized constant time
|
||||
//! <b>Complexity</b>: If p is end(), amortized constant time
|
||||
//! Linear time otherwise.
|
||||
iterator insert(const_iterator position, T &&x);
|
||||
iterator insert(const_iterator p, T &&x);
|
||||
#else
|
||||
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator, const_iterator)
|
||||
#endif
|
||||
|
||||
//! <b>Requires</b>: pos must be a valid iterator of *this.
|
||||
//! <b>Requires</b>: p must be a valid iterator of *this.
|
||||
//!
|
||||
//! <b>Effects</b>: Insert n copies of x before position.
|
||||
//! <b>Effects</b>: Insert n copies of x before p.
|
||||
//!
|
||||
//! <b>Returns</b>: an iterator to the first inserted element or position if n is 0.
|
||||
//! <b>Returns</b>: an iterator to the first inserted element or p if n is 0.
|
||||
//!
|
||||
//! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to n.
|
||||
iterator insert(const_iterator position, size_type n, const T& t)
|
||||
iterator insert(const_iterator p, size_type n, const T& t)
|
||||
{
|
||||
STABLE_VECTOR_CHECK_INVARIANT;
|
||||
typedef constant_iterator<value_type, difference_type> cvalue_iterator;
|
||||
return this->insert(position, cvalue_iterator(t, n), cvalue_iterator());
|
||||
return this->insert(p, cvalue_iterator(t, n), cvalue_iterator());
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: pos must be a valid iterator of *this.
|
||||
//! <b>Requires</b>: p must be a valid iterator of *this.
|
||||
//!
|
||||
//! <b>Effects</b>: Insert a copy of the [first, last) range before pos.
|
||||
//! <b>Effects</b>: Insert a copy of the [first, last) range before p.
|
||||
//!
|
||||
//! <b>Returns</b>: an iterator to the first inserted element or position if first == last.
|
||||
//! <b>Returns</b>: an iterator to the first inserted element or p if first == last.
|
||||
//!
|
||||
//! <b>Throws</b>: If memory allocation throws, T's constructor from a
|
||||
//! dereferenced InpIt throws or T's copy constructor throws.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to std::distance [first, last).
|
||||
template <class InputIterator>
|
||||
iterator insert(const_iterator position, InputIterator first, InputIterator last
|
||||
iterator insert(const_iterator p, InputIterator first, InputIterator last
|
||||
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
, typename container_detail::enable_if_c
|
||||
< !container_detail::is_convertible<InputIterator, size_type>::value
|
||||
@@ -1366,16 +1365,16 @@ class stable_vector
|
||||
)
|
||||
{
|
||||
STABLE_VECTOR_CHECK_INVARIANT;
|
||||
const size_type pos_n = position - this->cbegin();
|
||||
const size_type pos_n = p - this->cbegin();
|
||||
for(; first != last; ++first){
|
||||
this->emplace(position, *first);
|
||||
this->emplace(p, *first);
|
||||
}
|
||||
return this->begin() + pos_n;
|
||||
}
|
||||
|
||||
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
template <class FwdIt>
|
||||
iterator insert(const_iterator position, FwdIt first, FwdIt last
|
||||
iterator insert(const_iterator p, FwdIt first, FwdIt last
|
||||
, typename container_detail::enable_if_c
|
||||
< !container_detail::is_convertible<FwdIt, size_type>::value
|
||||
&& !container_detail::is_input_iterator<FwdIt>::value
|
||||
@@ -1383,13 +1382,13 @@ class stable_vector
|
||||
)
|
||||
{
|
||||
const size_type num_new = static_cast<size_type>(std::distance(first, last));
|
||||
const size_type pos = static_cast<size_type>(position - this->cbegin());
|
||||
const size_type idx = static_cast<size_type>(p - this->cbegin());
|
||||
if(num_new){
|
||||
//Fills the node pool and inserts num_new null pointers in pos.
|
||||
//If a new buffer was needed fixes up pointers up to pos so
|
||||
//Fills the node pool and inserts num_new null pointers in idx.
|
||||
//If a new buffer was needed fixes up pointers up to idx so
|
||||
//past-new nodes are not aligned until the end of this function
|
||||
//or in a rollback in case of exception
|
||||
index_iterator it_past_newly_constructed(this->priv_insert_forward_non_templated(pos, num_new));
|
||||
index_iterator it_past_newly_constructed(this->priv_insert_forward_non_templated(idx, num_new));
|
||||
const index_iterator it_past_new(it_past_newly_constructed + num_new);
|
||||
{
|
||||
//Prepare rollback
|
||||
@@ -1407,10 +1406,10 @@ class stable_vector
|
||||
//rollback.~insert_rollback() called in case of exception
|
||||
}
|
||||
//Fix up pointers for past-new nodes (new nodes were fixed during construction) and
|
||||
//nodes before insertion position in priv_insert_forward_non_templated(...)
|
||||
//nodes before insertion p in priv_insert_forward_non_templated(...)
|
||||
index_traits_type::fix_up_pointers_from(this->index, it_past_newly_constructed);
|
||||
}
|
||||
return this->begin() + pos;
|
||||
return this->begin() + idx;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1422,18 +1421,18 @@ class stable_vector
|
||||
void pop_back() BOOST_CONTAINER_NOEXCEPT
|
||||
{ this->erase(--this->cend()); }
|
||||
|
||||
//! <b>Effects</b>: Erases the element at position pos.
|
||||
//! <b>Effects</b>: Erases the element at p.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the elements between pos and the
|
||||
//! last element. Constant if pos is the last element.
|
||||
iterator erase(const_iterator position) BOOST_CONTAINER_NOEXCEPT
|
||||
//! <b>Complexity</b>: Linear to the elements between p and the
|
||||
//! last element. Constant if p is the last element.
|
||||
iterator erase(const_iterator p) BOOST_CONTAINER_NOEXCEPT
|
||||
{
|
||||
STABLE_VECTOR_CHECK_INVARIANT;
|
||||
const size_type d = position - this->cbegin();
|
||||
const size_type d = p - this->cbegin();
|
||||
index_iterator it = this->index.begin() + d;
|
||||
this->priv_delete_node(position.node_pointer());
|
||||
this->priv_delete_node(p.node_pointer());
|
||||
it = this->index.erase(it);
|
||||
index_traits_type::fix_up_pointers_from(this->index, it);
|
||||
return iterator(node_ptr_traits::static_cast_from(*it));
|
||||
@@ -1444,7 +1443,7 @@ class stable_vector
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the distance between first and last
|
||||
//! plus linear to the elements between pos and the last element.
|
||||
//! plus linear to the elements between p and the last element.
|
||||
iterator erase(const_iterator first, const_iterator last) BOOST_CONTAINER_NOEXCEPT
|
||||
{
|
||||
STABLE_VECTOR_CHECK_INVARIANT;
|
||||
@@ -1584,7 +1583,7 @@ class stable_vector
|
||||
node_ptr m_p;
|
||||
};
|
||||
|
||||
index_iterator priv_insert_forward_non_templated(size_type pos, size_type num_new)
|
||||
index_iterator priv_insert_forward_non_templated(size_type idx, size_type num_new)
|
||||
{
|
||||
index_traits_type::initialize_end_node(this->index, this->internal_data.end_node, num_new);
|
||||
|
||||
@@ -1595,15 +1594,15 @@ class stable_vector
|
||||
|
||||
//Now try to make room in the vector
|
||||
const node_base_ptr_ptr old_buffer = this->index.data();
|
||||
this->index.insert(this->index.begin() + pos, num_new, node_ptr());
|
||||
this->index.insert(this->index.begin() + idx, num_new, node_ptr());
|
||||
bool new_buffer = this->index.data() != old_buffer;
|
||||
|
||||
//Fix the pointers for the newly allocated buffer
|
||||
const index_iterator index_beg = this->index.begin();
|
||||
if(new_buffer){
|
||||
index_traits_type::fix_up_pointers(index_beg, index_beg + pos);
|
||||
index_traits_type::fix_up_pointers(index_beg, index_beg + idx);
|
||||
}
|
||||
return index_beg + pos;
|
||||
return index_beg + idx;
|
||||
}
|
||||
|
||||
bool priv_capacity_bigger_than_size() const
|
||||
@@ -1634,18 +1633,18 @@ class stable_vector
|
||||
}
|
||||
}
|
||||
|
||||
iterator priv_insert(const_iterator position, const value_type &t)
|
||||
iterator priv_insert(const_iterator p, const value_type &t)
|
||||
{
|
||||
typedef constant_iterator<value_type, difference_type> cvalue_iterator;
|
||||
return this->insert(position, cvalue_iterator(t, 1), cvalue_iterator());
|
||||
return this->insert(p, cvalue_iterator(t, 1), cvalue_iterator());
|
||||
}
|
||||
|
||||
iterator priv_insert(const_iterator position, BOOST_RV_REF(T) x)
|
||||
iterator priv_insert(const_iterator p, BOOST_RV_REF(T) x)
|
||||
{
|
||||
typedef repeat_iterator<T, difference_type> repeat_it;
|
||||
typedef boost::move_iterator<repeat_it> repeat_move_it;
|
||||
//Just call more general insert(pos, size, value) and return iterator
|
||||
return this->insert(position, repeat_move_it(repeat_it(x, 1)), repeat_move_it(repeat_it()));
|
||||
//Just call more general insert(p, size, value) and return iterator
|
||||
return this->insert(p, repeat_move_it(repeat_it(x, 1)), repeat_move_it(repeat_it()));
|
||||
}
|
||||
|
||||
void priv_clear_pool()
|
||||
|
@@ -468,12 +468,12 @@ public:
|
||||
void pop_back();
|
||||
|
||||
//! @pre
|
||||
//! @li \c position must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>.
|
||||
//! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>.
|
||||
//! @li <tt>size() < capacity()</tt>
|
||||
//!
|
||||
//! @brief Inserts a copy of element at position.
|
||||
//! @brief Inserts a copy of element at p.
|
||||
//!
|
||||
//! @param position The position at which the new value will be inserted.
|
||||
//! @param p The position at which the new value will be inserted.
|
||||
//! @param value The value used to copy construct the new element.
|
||||
//!
|
||||
//! @par Throws
|
||||
@@ -482,15 +482,15 @@ public:
|
||||
//!
|
||||
//! @par Complexity
|
||||
//! Constant or linear.
|
||||
iterator insert(iterator position, value_type const& value);
|
||||
iterator insert(const_iterator p, value_type const& value);
|
||||
|
||||
//! @pre
|
||||
//! @li \c position must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>.
|
||||
//! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>.
|
||||
//! @li <tt>size() < capacity()</tt>
|
||||
//!
|
||||
//! @brief Inserts a move-constructed element at position.
|
||||
//! @brief Inserts a move-constructed element at p.
|
||||
//!
|
||||
//! @param position The position at which the new value will be inserted.
|
||||
//! @param p The position at which the new value will be inserted.
|
||||
//! @param value The value used to move construct the new element.
|
||||
//!
|
||||
//! @par Throws
|
||||
@@ -498,15 +498,15 @@ public:
|
||||
//!
|
||||
//! @par Complexity
|
||||
//! Constant or linear.
|
||||
iterator insert(iterator position, BOOST_RV_REF(value_type) value);
|
||||
iterator insert(const_iterator p, BOOST_RV_REF(value_type) value);
|
||||
|
||||
//! @pre
|
||||
//! @li \c position must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>.
|
||||
//! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>.
|
||||
//! @li <tt>size() + count <= capacity()</tt>
|
||||
//!
|
||||
//! @brief Inserts a count copies of value at position.
|
||||
//! @brief Inserts a count copies of value at p.
|
||||
//!
|
||||
//! @param position The position at which new elements will be inserted.
|
||||
//! @param p The position at which new elements will be inserted.
|
||||
//! @param count The number of new elements which will be inserted.
|
||||
//! @param value The value used to copy construct new elements.
|
||||
//!
|
||||
@@ -516,16 +516,16 @@ public:
|
||||
//!
|
||||
//! @par Complexity
|
||||
//! Linear O(N).
|
||||
iterator insert(iterator position, size_type count, value_type const& value);
|
||||
iterator insert(const_iterator p, size_type count, value_type const& value);
|
||||
|
||||
//! @pre
|
||||
//! @li \c position must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>.
|
||||
//! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>.
|
||||
//! @li <tt>distance(first, last) <= capacity()</tt>
|
||||
//! @li \c Iterator must meet the \c ForwardTraversalIterator concept.
|
||||
//!
|
||||
//! @brief Inserts a copy of a range <tt>[first, last)</tt> at position.
|
||||
//! @brief Inserts a copy of a range <tt>[first, last)</tt> at p.
|
||||
//!
|
||||
//! @param position The position at which new elements will be inserted.
|
||||
//! @param p The position at which new elements will be inserted.
|
||||
//! @param first The iterator to the first element of a range used to construct new elements.
|
||||
//! @param last The iterator to the one after the last element of a range used to construct new elements.
|
||||
//!
|
||||
@@ -536,20 +536,20 @@ public:
|
||||
//! @par Complexity
|
||||
//! Linear O(N).
|
||||
template <typename Iterator>
|
||||
iterator insert(iterator position, Iterator first, Iterator last);
|
||||
iterator insert(const_iterator p, Iterator first, Iterator last);
|
||||
|
||||
//! @pre \c position must be a valid iterator of \c *this in range <tt>[begin(), end())</tt>
|
||||
//! @pre \c p must be a valid iterator of \c *this in range <tt>[begin(), end())</tt>
|
||||
//!
|
||||
//! @brief Erases Value from position.
|
||||
//! @brief Erases Value from p.
|
||||
//!
|
||||
//! @param position The position of the element which will be erased from the container.
|
||||
//! @param p The position of the element which will be erased from the container.
|
||||
//!
|
||||
//! @par Throws
|
||||
//! If Value's move assignment throws.
|
||||
//!
|
||||
//! @par Complexity
|
||||
//! Linear O(N).
|
||||
iterator erase(iterator position);
|
||||
iterator erase(const_iterator p);
|
||||
|
||||
//! @pre
|
||||
//! @li \c first and \c last must define a valid range
|
||||
@@ -565,7 +565,7 @@ public:
|
||||
//!
|
||||
//! @par Complexity
|
||||
//! Linear O(N).
|
||||
iterator erase(iterator first, iterator last);
|
||||
iterator erase(const_iterator first, const_iterator last);
|
||||
|
||||
//! @pre <tt>distance(first, last) <= capacity()</tt>
|
||||
//!
|
||||
@@ -612,13 +612,13 @@ public:
|
||||
void emplace_back(Args &&...args);
|
||||
|
||||
//! @pre
|
||||
//! @li \c position must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>
|
||||
//! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>
|
||||
//! @li <tt>size() < capacity()</tt>
|
||||
//!
|
||||
//! @brief Inserts a Value constructed with
|
||||
//! \c std::forward<Args>(args)... before position
|
||||
//! \c std::forward<Args>(args)... before p
|
||||
//!
|
||||
//! @param position The position at which new elements will be inserted.
|
||||
//! @param p The position at which new elements will be inserted.
|
||||
//! @param args The arguments of the constructor of the new element.
|
||||
//!
|
||||
//! @par Throws
|
||||
@@ -627,7 +627,7 @@ public:
|
||||
//! @par Complexity
|
||||
//! Constant or linear.
|
||||
template<class ...Args>
|
||||
iterator emplace(iterator position, Args &&...args);
|
||||
iterator emplace(const_iterator p, Args &&...args);
|
||||
|
||||
//! @brief Removes all elements from the container.
|
||||
//!
|
||||
|
Reference in New Issue
Block a user