Doxygen documentation fixes

[SVN r80742]
This commit is contained in:
Ion Gaztañaga
2012-09-28 21:03:07 +00:00
parent 17e5e64dd6
commit 42974d17fc
7 changed files with 498 additions and 295 deletions

View File

@@ -127,48 +127,54 @@ class flat_map
typedef typename impl_tree_t::const_reverse_iterator impl_const_reverse_iterator;
typedef typename impl_tree_t::allocator_type impl_allocator_type;
typedef allocator_traits<A> allocator_traits_type;
typedef container_detail::flat_tree_value_compare
< Pred
, container_detail::select1st< std::pair<Key, T> >
, std::pair<Key, T> > value_compare_impl;
typedef typename container_detail::get_flat_tree_iterators
<typename allocator_traits<A>::pointer>::iterator iterator_impl;
typedef typename container_detail::get_flat_tree_iterators
<typename allocator_traits<A>::pointer>::const_iterator const_iterator_impl;
typedef typename container_detail::get_flat_tree_iterators
<typename allocator_traits<A>::pointer>::reverse_iterator reverse_iterator_impl;
typedef typename container_detail::get_flat_tree_iterators
<typename allocator_traits<A>::pointer>::const_reverse_iterator const_reverse_iterator_impl;
/// @endcond
public:
// typedefs:
//////////////////////////////////////////////
//
// types
//
//////////////////////////////////////////////
typedef Key key_type;
typedef T mapped_type;
typedef typename std::pair<key_type, mapped_type> value_type;
typedef typename allocator_traits_type::pointer pointer;
typedef typename allocator_traits_type::const_pointer const_pointer;
typedef typename allocator_traits_type::reference reference;
typedef typename allocator_traits_type::const_reference const_reference;
typedef typename impl_tree_t::size_type size_type;
typedef typename impl_tree_t::difference_type difference_type;
typedef container_detail::flat_tree_value_compare
< Pred
, container_detail::select1st< std::pair<Key, T> >
, std::pair<Key, T> > value_compare;
typedef Pred key_compare;
typedef typename container_detail::
get_flat_tree_iterators<pointer>::iterator iterator;
typedef typename container_detail::
get_flat_tree_iterators<pointer>::const_iterator const_iterator;
typedef typename container_detail::
get_flat_tree_iterators
<pointer>::reverse_iterator reverse_iterator;
typedef typename container_detail::
get_flat_tree_iterators
<pointer>::const_reverse_iterator const_reverse_iterator;
typedef typename boost::container::allocator_traits<A>::pointer pointer;
typedef typename boost::container::allocator_traits<A>::const_pointer const_pointer;
typedef typename boost::container::allocator_traits<A>::reference reference;
typedef typename boost::container::allocator_traits<A>::const_reference const_reference;
typedef typename boost::container::allocator_traits<A>::size_type size_type;
typedef typename boost::container::allocator_traits<A>::difference_type difference_type;
typedef A allocator_type;
//!Standard extension
typedef A stored_allocator_type;
//!Standard extension for C++03 compilers with non-movable std::pair
typedef impl_value_type movable_value_type;
typedef BOOST_CONTAINER_IMPDEF(A) stored_allocator_type;
typedef BOOST_CONTAINER_IMPDEF(value_compare_impl) value_compare;
typedef Pred key_compare;
typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator;
typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator;
typedef BOOST_CONTAINER_IMPDEF(reverse_iterator_impl) reverse_iterator;
typedef BOOST_CONTAINER_IMPDEF(const_reverse_iterator_impl) const_reverse_iterator;
typedef BOOST_CONTAINER_IMPDEF(impl_value_type) movable_value_type;
public:
//////////////////////////////////////////////
//
// construct/copy/destroy
//
//////////////////////////////////////////////
//! <b>Effects</b>: Default constructs an empty flat_map.
//!
//! <b>Complexity</b>: Constant.
@@ -255,20 +261,6 @@ class flat_map
flat_map& operator=(BOOST_RV_REF(flat_map) mx)
{ m_flat_tree = boost::move(mx.m_flat_tree); return *this; }
//! <b>Effects</b>: Returns the comparison object out
//! of which a was constructed.
//!
//! <b>Complexity</b>: Constant.
key_compare key_comp() const
{ return container_detail::force_copy<key_compare>(m_flat_tree.key_comp()); }
//! <b>Effects</b>: Returns an object of value_compare constructed out
//! of the comparison object.
//!
//! <b>Complexity</b>: Constant.
value_compare value_comp() const
{ return value_compare(container_detail::force_copy<key_compare>(m_flat_tree.key_comp())); }
//! <b>Effects</b>: Returns a copy of the Allocator that
//! was passed to the object's constructor.
//!
@@ -276,11 +268,31 @@ class flat_map
allocator_type get_allocator() const
{ return container_detail::force_copy<allocator_type>(m_flat_tree.get_allocator()); }
//! <b>Effects</b>: Returns a reference to the internal allocator.
//!
//! <b>Throws</b>: Nothing
//!
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension.
stored_allocator_type &get_stored_allocator()
{ return container_detail::force<stored_allocator_type>(m_flat_tree.get_stored_allocator()); }
//! <b>Effects</b>: Returns a reference to the internal allocator.
//!
//! <b>Throws</b>: Nothing
//!
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension.
const stored_allocator_type &get_stored_allocator() const
{ return container_detail::force<stored_allocator_type>(m_flat_tree.get_stored_allocator()); }
stored_allocator_type &get_stored_allocator()
{ return container_detail::force<stored_allocator_type>(m_flat_tree.get_stored_allocator()); }
//////////////////////////////////////////////
//
// iterators
//
//////////////////////////////////////////////
//! <b>Effects</b>: Returns an iterator to the first element contained in the container.
//!
@@ -384,6 +396,12 @@ class flat_map
const_reverse_iterator crend() const
{ return container_detail::force_copy<const_reverse_iterator>(m_flat_tree.crend()); }
//////////////////////////////////////////////
//
// capacity
//
//////////////////////////////////////////////
//! <b>Effects</b>: Returns true if the container contains no elements.
//!
//! <b>Throws</b>: Nothing.
@@ -408,6 +426,42 @@ class flat_map
size_type max_size() const
{ return m_flat_tree.max_size(); }
//! <b>Effects</b>: Number of elements for which memory has been allocated.
//! capacity() is always greater than or equal to size().
//!
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
size_type capacity() const
{ return m_flat_tree.capacity(); }
//! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
//! effect. Otherwise, it is a request for allocation of additional memory.
//! If the request is successful, then capacity() is greater than or equal to
//! n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
//!
//! <b>Throws</b>: If memory allocation allocation throws or T's copy constructor throws.
//!
//! <b>Note</b>: If capacity() is less than "count", iterators and references to
//! to values might be invalidated.
void reserve(size_type count)
{ m_flat_tree.reserve(count); }
//! <b>Effects</b>: Tries to deallocate the excess of memory created
// with previous allocations. The size of the vector is unchanged
//!
//! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
//!
//! <b>Complexity</b>: Linear to size().
void shrink_to_fit()
{ m_flat_tree.shrink_to_fit(); }
//////////////////////////////////////////////
//
// element access
//
//////////////////////////////////////////////
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
//! Effects: If there is no key equivalent to x in the flat_map, inserts
//! value_type(x, T()) into the flat_map.
@@ -430,7 +484,9 @@ class flat_map
#endif
//! Returns: A reference to the element whose key is equivalent to x.
//!
//! Throws: An exception object of type out_of_range if no such element is present.
//!
//! Complexity: logarithmic.
T& at(const key_type& k)
{
@@ -442,7 +498,9 @@ class flat_map
}
//! Returns: A reference to the element whose key is equivalent to x.
//!
//! Throws: An exception object of type out_of_range if no such element is present.
//!
//! Complexity: logarithmic.
const T& at(const key_type& k) const
{
@@ -453,13 +511,69 @@ class flat_map
return i->second;
}
//! <b>Effects</b>: Swaps the contents of *this and x.
//////////////////////////////////////////////
//
// modifiers
//
//////////////////////////////////////////////
#if defined(BOOST_CONTAINER_PERFECT_FORWARDING) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
//! <b>Effects</b>: Inserts an object x of type T constructed with
//! std::forward<Args>(args)... if and only if there is no element in the container
//! with key equivalent to the key of x.
//!
//! <b>Throws</b>: Nothing.
//! <b>Returns</b>: The bool component of the returned pair is true if and only
//! if the insertion takes place, and the iterator component of the pair
//! points to the element with key equivalent to the key of x.
//!
//! <b>Complexity</b>: Constant.
void swap(flat_map& x)
{ m_flat_tree.swap(x.m_flat_tree); }
//! <b>Complexity</b>: Logarithmic search time plus linear insertion
//! to the elements with bigger keys than x.
//!
//! <b>Note</b>: If an element is inserted it might invalidate elements.
template <class... Args>
std::pair<iterator,bool> emplace(Args&&... args)
{ return container_detail::force_copy< std::pair<iterator, bool> >(m_flat_tree.emplace_unique(boost::forward<Args>(args)...)); }
//! <b>Effects</b>: Inserts an object of type T constructed with
//! std::forward<Args>(args)... in the container if and only if there is
//! no element in the container with key equivalent to the key of x.
//! p is a hint pointing to where the insert should start to search.
//!
//! <b>Returns</b>: An iterator pointing to the element with key equivalent
//! to the key of x.
//!
//! <b>Complexity</b>: Logarithmic search time (constant if x is inserted
//! 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.
template <class... Args>
iterator emplace_hint(const_iterator hint, Args&&... args)
{
return container_detail::force_copy<iterator>
(m_flat_tree.emplace_hint_unique( container_detail::force_copy<impl_const_iterator>(hint)
, boost::forward<Args>(args)...));
}
#else //#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
#define BOOST_PP_LOCAL_MACRO(n) \
BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
std::pair<iterator,bool> emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
{ return container_detail::force_copy< std::pair<iterator, bool> > \
(m_flat_tree.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 \
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
{ return container_detail::force_copy<iterator>(m_flat_tree.emplace_hint_unique \
(container_detail::force_copy<impl_const_iterator>(hint) \
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()
#endif //#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
//! <b>Effects</b>: Inserts x if and only if there is no element in the container
//! with key equivalent to the key of x.
@@ -587,64 +701,6 @@ class flat_map
void insert(ordered_unique_range_t, InputIterator first, InputIterator last)
{ m_flat_tree.insert_unique(ordered_unique_range, first, last); }
#if defined(BOOST_CONTAINER_PERFECT_FORWARDING) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
//! <b>Effects</b>: Inserts an object x of type T constructed with
//! std::forward<Args>(args)... if and only if there is no element in the container
//! with key equivalent to the key of x.
//!
//! <b>Returns</b>: The bool component of the returned pair is true if and only
//! if the insertion takes place, and the iterator component of the pair
//! points to the element with key equivalent to the key of x.
//!
//! <b>Complexity</b>: Logarithmic search time plus linear insertion
//! to the elements with bigger keys than x.
//!
//! <b>Note</b>: If an element is inserted it might invalidate elements.
template <class... Args>
std::pair<iterator,bool> emplace(Args&&... args)
{ return container_detail::force_copy< std::pair<iterator, bool> >(m_flat_tree.emplace_unique(boost::forward<Args>(args)...)); }
//! <b>Effects</b>: Inserts an object of type T constructed with
//! std::forward<Args>(args)... in the container if and only if there is
//! no element in the container with key equivalent to the key of x.
//! p is a hint pointing to where the insert should start to search.
//!
//! <b>Returns</b>: An iterator pointing to the element with key equivalent
//! to the key of x.
//!
//! <b>Complexity</b>: Logarithmic search time (constant if x is inserted
//! 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.
template <class... Args>
iterator emplace_hint(const_iterator hint, Args&&... args)
{
return container_detail::force_copy<iterator>
(m_flat_tree.emplace_hint_unique( container_detail::force_copy<impl_const_iterator>(hint)
, boost::forward<Args>(args)...));
}
#else //#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
#define BOOST_PP_LOCAL_MACRO(n) \
BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
std::pair<iterator,bool> emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
{ return container_detail::force_copy< std::pair<iterator, bool> > \
(m_flat_tree.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 \
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
{ return container_detail::force_copy<iterator>(m_flat_tree.emplace_hint_unique \
(container_detail::force_copy<impl_const_iterator>(hint) \
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()
#endif //#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
//! <b>Effects</b>: Erases the element pointed to by position.
//!
//! <b>Returns</b>: Returns an iterator pointing to the element immediately
@@ -685,6 +741,14 @@ class flat_map
, container_detail::force_copy<impl_const_iterator>(last)));
}
//! <b>Effects</b>: Swaps the contents of *this and x.
//!
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
void swap(flat_map& x)
{ m_flat_tree.swap(x.m_flat_tree); }
//! <b>Effects</b>: erase(a.begin(),a.end()).
//!
//! <b>Postcondition</b>: size() == 0.
@@ -693,14 +757,31 @@ class flat_map
void clear()
{ m_flat_tree.clear(); }
//! <b>Effects</b>: Tries to deallocate the excess of memory created
// with previous allocations. The size of the vector is unchanged
//////////////////////////////////////////////
//
// observers
//
//////////////////////////////////////////////
//! <b>Effects</b>: Returns the comparison object out
//! of which a was constructed.
//!
//! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
//! <b>Complexity</b>: Constant.
key_compare key_comp() const
{ return container_detail::force_copy<key_compare>(m_flat_tree.key_comp()); }
//! <b>Effects</b>: Returns an object of value_compare constructed out
//! of the comparison object.
//!
//! <b>Complexity</b>: Linear to size().
void shrink_to_fit()
{ m_flat_tree.shrink_to_fit(); }
//! <b>Complexity</b>: Constant.
value_compare value_comp() const
{ return value_compare(container_detail::force_copy<key_compare>(m_flat_tree.key_comp())); }
//////////////////////////////////////////////
//
// map operations
//
//////////////////////////////////////////////
//! <b>Returns</b>: An iterator pointing to an element with the key
//! equivalent to x, or end() if such an element is not found.
@@ -762,27 +843,6 @@ class flat_map
std::pair<const_iterator,const_iterator> equal_range(const key_type& x) const
{ return container_detail::force_copy<std::pair<const_iterator,const_iterator> >(m_flat_tree.equal_range(x)); }
//! <b>Effects</b>: Number of elements for which memory has been allocated.
//! capacity() is always greater than or equal to size().
//!
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
size_type capacity() const
{ return m_flat_tree.capacity(); }
//! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
//! effect. Otherwise, it is a request for allocation of additional memory.
//! If the request is successful, then capacity() is greater than or equal to
//! n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
//!
//! <b>Throws</b>: If memory allocation allocation throws or T's copy constructor throws.
//!
//! <b>Note</b>: If capacity() is less than "count", iterators and references to
//! to values might be invalidated.
void reserve(size_type count)
{ m_flat_tree.reserve(count); }
/// @cond
template <class K1, class T1, class C1, class A1>
friend bool operator== (const flat_map<K1, T1, C1, A1>&,
@@ -928,42 +988,51 @@ class flat_multimap
typedef typename impl_tree_t::const_reverse_iterator impl_const_reverse_iterator;
typedef typename impl_tree_t::allocator_type impl_allocator_type;
typedef allocator_traits<A> allocator_traits_type;
typedef container_detail::flat_tree_value_compare
< Pred
, container_detail::select1st< std::pair<Key, T> >
, std::pair<Key, T> > value_compare_impl;
typedef typename container_detail::get_flat_tree_iterators
<typename allocator_traits<A>::pointer>::iterator iterator_impl;
typedef typename container_detail::get_flat_tree_iterators
<typename allocator_traits<A>::pointer>::const_iterator const_iterator_impl;
typedef typename container_detail::get_flat_tree_iterators
<typename allocator_traits<A>::pointer>::reverse_iterator reverse_iterator_impl;
typedef typename container_detail::get_flat_tree_iterators
<typename allocator_traits<A>::pointer>::const_reverse_iterator const_reverse_iterator_impl;
/// @endcond
public:
// typedefs:
//////////////////////////////////////////////
//
// types
//
//////////////////////////////////////////////
typedef Key key_type;
typedef T mapped_type;
typedef Pred key_compare;
typedef typename std::pair<key_type, mapped_type> value_type;
typedef typename allocator_traits_type::pointer pointer;
typedef typename allocator_traits_type::const_pointer const_pointer;
typedef typename allocator_traits_type::reference reference;
typedef typename allocator_traits_type::const_reference const_reference;
typedef typename impl_tree_t::size_type size_type;
typedef typename impl_tree_t::difference_type difference_type;
typedef container_detail::flat_tree_value_compare
< Pred
, container_detail::select1st< std::pair<Key, T> >
, std::pair<Key, T> > value_compare;
typedef typename container_detail::
get_flat_tree_iterators<pointer>::iterator iterator;
typedef typename container_detail::
get_flat_tree_iterators<pointer>::const_iterator const_iterator;
typedef typename container_detail::
get_flat_tree_iterators
<pointer>::reverse_iterator reverse_iterator;
typedef typename container_detail::
get_flat_tree_iterators
<pointer>::const_reverse_iterator const_reverse_iterator;
typedef typename boost::container::allocator_traits<A>::pointer pointer;
typedef typename boost::container::allocator_traits<A>::const_pointer const_pointer;
typedef typename boost::container::allocator_traits<A>::reference reference;
typedef typename boost::container::allocator_traits<A>::const_reference const_reference;
typedef typename boost::container::allocator_traits<A>::size_type size_type;
typedef typename boost::container::allocator_traits<A>::difference_type difference_type;
typedef A allocator_type;
//Non-standard extension
typedef A stored_allocator_type;
//!Standard extension for C++03 compilers with non-movable std::pair
typedef impl_value_type movable_value_type;
typedef BOOST_CONTAINER_IMPDEF(A) stored_allocator_type;
typedef BOOST_CONTAINER_IMPDEF(value_compare_impl) value_compare;
typedef Pred key_compare;
typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator;
typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator;
typedef BOOST_CONTAINER_IMPDEF(reverse_iterator_impl) reverse_iterator;
typedef BOOST_CONTAINER_IMPDEF(const_reverse_iterator_impl) const_reverse_iterator;
typedef BOOST_CONTAINER_IMPDEF(impl_value_type) movable_value_type;
//////////////////////////////////////////////
//
// construct/copy/destroy
//
//////////////////////////////////////////////
//! <b>Effects</b>: Default constructs an empty flat_map.
//!
@@ -1020,7 +1089,7 @@ class flat_multimap
//! <b>Postcondition</b>: x is emptied.
flat_multimap(BOOST_RV_REF(flat_multimap) x)
: m_flat_tree(boost::move(x.m_flat_tree))
{ }
{}
//! <b>Effects</b>: Copy constructs a flat_multimap using the specified allocator.
//!
@@ -1049,20 +1118,6 @@ class flat_multimap
flat_multimap& operator=(BOOST_RV_REF(flat_multimap) mx)
{ m_flat_tree = boost::move(mx.m_flat_tree); return *this; }
//! <b>Effects</b>: Returns the comparison object out
//! of which a was constructed.
//!
//! <b>Complexity</b>: Constant.
key_compare key_comp() const
{ return container_detail::force_copy<key_compare>(m_flat_tree.key_comp()); }
//! <b>Effects</b>: Returns an object of value_compare constructed out
//! of the comparison object.
//!
//! <b>Complexity</b>: Constant.
value_compare value_comp() const
{ return value_compare(container_detail::force_copy<key_compare>(m_flat_tree.key_comp())); }
//! <b>Effects</b>: Returns a copy of the Allocator that
//! was passed to the object's constructor.
//!
@@ -1070,11 +1125,31 @@ class flat_multimap
allocator_type get_allocator() const
{ return container_detail::force_copy<allocator_type>(m_flat_tree.get_allocator()); }
//! <b>Effects</b>: Returns a reference to the internal allocator.
//!
//! <b>Throws</b>: Nothing
//!
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension.
stored_allocator_type &get_stored_allocator()
{ return container_detail::force<stored_allocator_type>(m_flat_tree.get_stored_allocator()); }
//! <b>Effects</b>: Returns a reference to the internal allocator.
//!
//! <b>Throws</b>: Nothing
//!
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension.
const stored_allocator_type &get_stored_allocator() const
{ return container_detail::force<stored_allocator_type>(m_flat_tree.get_stored_allocator()); }
stored_allocator_type &get_stored_allocator()
{ return container_detail::force<stored_allocator_type>(m_flat_tree.get_stored_allocator()); }
//////////////////////////////////////////////
//
// iterators
//
//////////////////////////////////////////////
//! <b>Effects</b>: Returns an iterator to the first element contained in the container.
//!
@@ -1178,6 +1253,12 @@ class flat_multimap
const_reverse_iterator crend() const
{ return container_detail::force_copy<const_reverse_iterator>(m_flat_tree.crend()); }
//////////////////////////////////////////////
//
// capacity
//
//////////////////////////////////////////////
//! <b>Effects</b>: Returns true if the container contains no elements.
//!
//! <b>Throws</b>: Nothing.
@@ -1202,13 +1283,94 @@ class flat_multimap
size_type max_size() const
{ return m_flat_tree.max_size(); }
//! <b>Effects</b>: Swaps the contents of *this and x.
//! <b>Effects</b>: Number of elements for which memory has been allocated.
//! capacity() is always greater than or equal to size().
//!
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
void swap(flat_multimap& x)
{ m_flat_tree.swap(x.m_flat_tree); }
size_type capacity() const
{ return m_flat_tree.capacity(); }
//! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
//! effect. Otherwise, it is a request for allocation of additional memory.
//! If the request is successful, then capacity() is greater than or equal to
//! n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
//!
//! <b>Throws</b>: If memory allocation allocation throws or T's copy constructor throws.
//!
//! <b>Note</b>: If capacity() is less than "count", iterators and references to
//! to values might be invalidated.
void reserve(size_type count)
{ m_flat_tree.reserve(count); }
//! <b>Effects</b>: Tries to deallocate the excess of memory created
// with previous allocations. The size of the vector is unchanged
//!
//! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
//!
//! <b>Complexity</b>: Linear to size().
void shrink_to_fit()
{ m_flat_tree.shrink_to_fit(); }
//////////////////////////////////////////////
//
// modifiers
//
//////////////////////////////////////////////
#if defined(BOOST_CONTAINER_PERFECT_FORWARDING) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
//! <b>Effects</b>: Inserts an object of type T constructed with
//! std::forward<Args>(args)... and returns the iterator pointing to the
//! newly inserted element.
//!
//! <b>Complexity</b>: Logarithmic search time plus linear insertion
//! to the elements with bigger keys than x.
//!
//! <b>Note</b>: If an element is inserted it might invalidate elements.
template <class... Args>
iterator emplace(Args&&... args)
{ return container_detail::force_copy<iterator>(m_flat_tree.emplace_equal(boost::forward<Args>(args)...)); }
//! <b>Effects</b>: Inserts an object of type T constructed with
//! std::forward<Args>(args)... in the container.
//! p is a hint pointing to where the insert should start to search.
//!
//! <b>Returns</b>: An iterator pointing to the element with key equivalent
//! to the key of x.
//!
//! <b>Complexity</b>: Logarithmic search time (constant time if the value
//! is to be inserted before p) plus linear insertion
//! to the elements with bigger keys than x.
//!
//! <b>Note</b>: If an element is inserted it might invalidate elements.
template <class... Args>
iterator emplace_hint(const_iterator hint, Args&&... args)
{
return container_detail::force_copy<iterator>(m_flat_tree.emplace_hint_equal
(container_detail::force_copy<impl_const_iterator>(hint), boost::forward<Args>(args)...));
}
#else //#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
#define BOOST_PP_LOCAL_MACRO(n) \
BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
iterator emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
{ return container_detail::force_copy<iterator>(m_flat_tree.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 \
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
{ return container_detail::force_copy<iterator>(m_flat_tree.emplace_hint_equal \
(container_detail::force_copy<impl_const_iterator>(hint) \
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()
#endif //#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
//! <b>Effects</b>: Inserts x and returns the iterator pointing to the
//! newly inserted element.
@@ -1324,59 +1486,6 @@ class flat_multimap
void insert(ordered_range_t, InputIterator first, InputIterator last)
{ m_flat_tree.insert_equal(ordered_range, first, last); }
#if defined(BOOST_CONTAINER_PERFECT_FORWARDING) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
//! <b>Effects</b>: Inserts an object of type T constructed with
//! std::forward<Args>(args)... and returns the iterator pointing to the
//! newly inserted element.
//!
//! <b>Complexity</b>: Logarithmic search time plus linear insertion
//! to the elements with bigger keys than x.
//!
//! <b>Note</b>: If an element is inserted it might invalidate elements.
template <class... Args>
iterator emplace(Args&&... args)
{ return container_detail::force_copy<iterator>(m_flat_tree.emplace_equal(boost::forward<Args>(args)...)); }
//! <b>Effects</b>: Inserts an object of type T constructed with
//! std::forward<Args>(args)... in the container.
//! p is a hint pointing to where the insert should start to search.
//!
//! <b>Returns</b>: An iterator pointing to the element with key equivalent
//! to the key of x.
//!
//! <b>Complexity</b>: Logarithmic search time (constant time if the value
//! is to be inserted before p) plus linear insertion
//! to the elements with bigger keys than x.
//!
//! <b>Note</b>: If an element is inserted it might invalidate elements.
template <class... Args>
iterator emplace_hint(const_iterator hint, Args&&... args)
{
return container_detail::force_copy<iterator>(m_flat_tree.emplace_hint_equal
(container_detail::force_copy<impl_const_iterator>(hint), boost::forward<Args>(args)...));
}
#else //#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
#define BOOST_PP_LOCAL_MACRO(n) \
BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
iterator emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
{ return container_detail::force_copy<iterator>(m_flat_tree.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 \
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
{ return container_detail::force_copy<iterator>(m_flat_tree.emplace_hint_equal \
(container_detail::force_copy<impl_const_iterator>(hint) \
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()
#endif //#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
//! <b>Effects</b>: Erases the element pointed to by position.
//!
//! <b>Returns</b>: Returns an iterator pointing to the element immediately
@@ -1417,6 +1526,14 @@ class flat_multimap
, container_detail::force_copy<impl_const_iterator>(last)));
}
//! <b>Effects</b>: Swaps the contents of *this and x.
//!
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
void swap(flat_multimap& x)
{ m_flat_tree.swap(x.m_flat_tree); }
//! <b>Effects</b>: erase(a.begin(),a.end()).
//!
//! <b>Postcondition</b>: size() == 0.
@@ -1425,14 +1542,31 @@ class flat_multimap
void clear()
{ m_flat_tree.clear(); }
//! <b>Effects</b>: Tries to deallocate the excess of memory created
// with previous allocations. The size of the vector is unchanged
//////////////////////////////////////////////
//
// observers
//
//////////////////////////////////////////////
//! <b>Effects</b>: Returns the comparison object out
//! of which a was constructed.
//!
//! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
//! <b>Complexity</b>: Constant.
key_compare key_comp() const
{ return container_detail::force_copy<key_compare>(m_flat_tree.key_comp()); }
//! <b>Effects</b>: Returns an object of value_compare constructed out
//! of the comparison object.
//!
//! <b>Complexity</b>: Linear to size().
void shrink_to_fit()
{ m_flat_tree.shrink_to_fit(); }
//! <b>Complexity</b>: Constant.
value_compare value_comp() const
{ return value_compare(container_detail::force_copy<key_compare>(m_flat_tree.key_comp())); }
//////////////////////////////////////////////
//
// map operations
//
//////////////////////////////////////////////
//! <b>Returns</b>: An iterator pointing to an element with the key
//! equivalent to x, or end() if such an element is not found.
@@ -1459,7 +1593,7 @@ class flat_multimap
//!
//! <b>Complexity</b>: Logarithmic
iterator lower_bound(const key_type& x)
{return container_detail::force_copy<iterator>(m_flat_tree.lower_bound(x)); }
{ return container_detail::force_copy<iterator>(m_flat_tree.lower_bound(x)); }
//! <b>Returns</b>: A const iterator pointing to the first element with key
//! not less than k, or a.end() if such an element is not found.
@@ -1495,27 +1629,6 @@ class flat_multimap
equal_range(const key_type& x) const
{ return container_detail::force_copy<std::pair<const_iterator,const_iterator> >(m_flat_tree.equal_range(x)); }
//! <b>Effects</b>: Number of elements for which memory has been allocated.
//! capacity() is always greater than or equal to size().
//!
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
size_type capacity() const
{ return m_flat_tree.capacity(); }
//! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
//! effect. Otherwise, it is a request for allocation of additional memory.
//! If the request is successful, then capacity() is greater than or equal to
//! n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
//!
//! <b>Throws</b>: If memory allocation allocation throws or T's copy constructor throws.
//!
//! <b>Note</b>: If capacity() is less than "count", iterators and references to
//! to values might be invalidated.
void reserve(size_type count)
{ m_flat_tree.reserve(count); }
/// @cond
template <class K1, class T1, class C1, class A1>
friend bool operator== (const flat_multimap<K1, T1, C1, A1>& x,

View File

@@ -209,10 +209,24 @@ class flat_set
allocator_type get_allocator() const
{ return m_flat_tree.get_allocator(); }
const stored_allocator_type &get_stored_allocator() const
//! <b>Effects</b>: Returns a reference to the internal allocator.
//!
//! <b>Throws</b>: Nothing
//!
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension.
stored_allocator_type &get_stored_allocator()
{ return m_flat_tree.get_stored_allocator(); }
stored_allocator_type &get_stored_allocator()
//! <b>Effects</b>: Returns a reference to the internal allocator.
//!
//! <b>Throws</b>: Nothing
//!
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension.
const stored_allocator_type &get_stored_allocator() const
{ return m_flat_tree.get_stored_allocator(); }
//! <b>Effects</b>: Returns an iterator to the first element contained in the container.
@@ -860,10 +874,24 @@ class flat_multiset
allocator_type get_allocator() const
{ return m_flat_tree.get_allocator(); }
const stored_allocator_type &get_stored_allocator() const
//! <b>Effects</b>: Returns a reference to the internal allocator.
//!
//! <b>Throws</b>: Nothing
//!
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension.
stored_allocator_type &get_stored_allocator()
{ return m_flat_tree.get_stored_allocator(); }
stored_allocator_type &get_stored_allocator()
//! <b>Effects</b>: Returns a reference to the internal allocator.
//!
//! <b>Throws</b>: Nothing
//!
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension.
const stored_allocator_type &get_stored_allocator() const
{ return m_flat_tree.get_stored_allocator(); }
//! <b>Effects</b>: Returns an iterator to the first element contained in the container.

View File

@@ -506,20 +506,24 @@ class list
allocator_type get_allocator() const
{ return allocator_type(this->node_alloc()); }
//! <b>Effects</b>: Returns a copy of the internal allocator.
//! <b>Effects</b>: Returns a reference to the internal allocator.
//!
//! <b>Throws</b>: If allocator's copy constructor throws.
//! <b>Throws</b>: Nothing
//!
//! <b>Complexity</b>: Constant.
const stored_allocator_type &get_stored_allocator() const
//!
//! <b>Note</b>: Non-standard extension.
stored_allocator_type &get_stored_allocator()
{ return this->node_alloc(); }
//! <b>Effects</b>: Returns a copy of the internal allocator.
//! <b>Effects</b>: Returns a reference to the internal allocator.
//!
//! <b>Throws</b>: If allocator's copy constructor throws.
//! <b>Throws</b>: Nothing
//!
//! <b>Complexity</b>: Constant.
stored_allocator_type &get_stored_allocator()
//!
//! <b>Note</b>: Non-standard extension.
const stored_allocator_type &get_stored_allocator() const
{ return this->node_alloc(); }
//////////////////////////////////////////////

View File

@@ -256,10 +256,24 @@ class map
allocator_type get_allocator() const
{ return m_tree.get_allocator(); }
const stored_allocator_type &get_stored_allocator() const
//! <b>Effects</b>: Returns a reference to the internal allocator.
//!
//! <b>Throws</b>: Nothing
//!
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension.
stored_allocator_type &get_stored_allocator()
{ return m_tree.get_stored_allocator(); }
stored_allocator_type &get_stored_allocator()
//! <b>Effects</b>: Returns a reference to the internal allocator.
//!
//! <b>Throws</b>: Nothing
//!
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension.
const stored_allocator_type &get_stored_allocator() const
{ return m_tree.get_stored_allocator(); }
//! <b>Effects</b>: Returns an iterator to the first element contained in the container.
@@ -998,10 +1012,24 @@ class multimap
allocator_type get_allocator() const
{ return m_tree.get_allocator(); }
const stored_allocator_type &get_stored_allocator() const
//! <b>Effects</b>: Returns a reference to the internal allocator.
//!
//! <b>Throws</b>: Nothing
//!
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension.
stored_allocator_type &get_stored_allocator()
{ return m_tree.get_stored_allocator(); }
stored_allocator_type &get_stored_allocator()
//! <b>Effects</b>: Returns a reference to the internal allocator.
//!
//! <b>Throws</b>: Nothing
//!
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension.
const stored_allocator_type &get_stored_allocator() const
{ return m_tree.get_stored_allocator(); }
//! <b>Effects</b>: Returns an iterator to the first element contained in the container.

View File

@@ -199,9 +199,23 @@ class set
allocator_type get_allocator() const
{ return m_tree.get_allocator(); }
//! <b>Effects</b>: Returns a reference to the internal allocator.
//!
//! <b>Throws</b>: Nothing
//!
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension.
const stored_allocator_type &get_stored_allocator() const
{ return m_tree.get_stored_allocator(); }
//! <b>Effects</b>: Returns a reference to the internal allocator.
//!
//! <b>Throws</b>: Nothing
//!
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension.
stored_allocator_type &get_stored_allocator()
{ return m_tree.get_stored_allocator(); }
@@ -788,10 +802,24 @@ class multiset
allocator_type get_allocator() const
{ return m_tree.get_allocator(); }
const stored_allocator_type &get_stored_allocator() const
//! <b>Effects</b>: Returns a reference to the internal allocator.
//!
//! <b>Throws</b>: Nothing
//!
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension.
stored_allocator_type &get_stored_allocator()
{ return m_tree.get_stored_allocator(); }
stored_allocator_type &get_stored_allocator()
//! <b>Effects</b>: Returns a reference to the internal allocator.
//!
//! <b>Throws</b>: Nothing
//!
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension.
const stored_allocator_type &get_stored_allocator() const
{ return m_tree.get_stored_allocator(); }
//! <b>Effects</b>: Returns an iterator to the first element contained in the container.

View File

@@ -519,12 +519,14 @@ class slist
allocator_type get_allocator() const
{ return allocator_type(this->node_alloc()); }
//! <b>Effects</b>: Returns a copy of the internal allocator.
//! <b>Effects</b>: Returns a reference to the internal allocator.
//!
//! <b>Throws</b>: If allocator's copy constructor throws.
//! <b>Throws</b>: Nothing
//!
//! <b>Complexity</b>: Constant.
const stored_allocator_type &get_stored_allocator() const
//!
//! <b>Note</b>: Non-standard extension.
stored_allocator_type &get_stored_allocator()
{ return this->node_alloc(); }
//! <b>Effects</b>: Returns a reference to the internal allocator.
@@ -534,7 +536,7 @@ class slist
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension.
stored_allocator_type &get_stored_allocator()
const stored_allocator_type &get_stored_allocator() const
{ return this->node_alloc(); }
//////////////////////////////////////////////

View File

@@ -932,7 +932,7 @@ class basic_string
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension.
const stored_allocator_type &get_stored_allocator() const BOOST_CONTAINER_NOEXCEPT
stored_allocator_type &get_stored_allocator() BOOST_CONTAINER_NOEXCEPT
{ return this->alloc(); }
//! <b>Effects</b>: Returns a reference to the internal allocator.
@@ -942,7 +942,7 @@ class basic_string
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Non-standard extension.
stored_allocator_type &get_stored_allocator() BOOST_CONTAINER_NOEXCEPT
const stored_allocator_type &get_stored_allocator() const BOOST_CONTAINER_NOEXCEPT
{ return this->alloc(); }
//! <b>Effects</b>: Returns the number of the elements contained in the vector.