Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions > Class Template Reference

#include <map.hpp>

Public Types

typedef Key key_type
 
typedef T mapped_type
 
typedef std::pair< const Key, Tvalue_type
 
typedef
boost::container::allocator_traits
< Allocator >::pointer 
pointer
 
typedef
boost::container::allocator_traits
< Allocator >::const_pointer 
const_pointer
 
typedef
boost::container::allocator_traits
< Allocator >::reference 
reference
 
typedef
boost::container::allocator_traits
< Allocator >::const_reference 
const_reference
 
typedef
boost::container::allocator_traits
< Allocator >::size_type 
size_type
 
typedef
boost::container::allocator_traits
< Allocator >::difference_type 
difference_type
 
typedef Allocator allocator_type
 
typedef Compare key_compare
 
typedef std::pair< key_type,
mapped_type
nonconst_value_type
 

Public Member Functions

typedef BOOST_CONTAINER_IMPDEF (base_t::stored_allocator_type) stored_allocator_type
 
typedef BOOST_CONTAINER_IMPDEF (value_compare_impl) value_compare
 
typedef BOOST_CONTAINER_IMPDEF (base_t::iterator) iterator
 
typedef BOOST_CONTAINER_IMPDEF (base_t::const_iterator) const _iterator
 
typedef BOOST_CONTAINER_IMPDEF (base_t::reverse_iterator) reverse_iterator
 
typedef BOOST_CONTAINER_IMPDEF (base_t::const_reverse_iterator) const _reverse_iterator
 
typedef BOOST_CONTAINER_IMPDEF (movable_value_type_impl) movable_value_type
 
 multimap ()
 Effects: Default constructs an empty multimap. More...
 
 multimap (const Compare &comp, const allocator_type &a=allocator_type())
 Effects: Constructs an empty multimap using the specified allocator. More...
 
 multimap (const allocator_type &a)
 Effects: Constructs an empty multimap using the specified comparison object and allocator. More...
 
template<class InputIterator >
 multimap (InputIterator first, InputIterator last, const Compare &comp=Compare(), const allocator_type &a=allocator_type())
 Effects: Constructs an empty multimap using the specified comparison object and allocator, and inserts elements from the range [first ,last ). More...
 
template<class InputIterator >
 multimap (ordered_range_t, InputIterator first, InputIterator last, const Compare &comp=Compare(), const allocator_type &a=allocator_type())
 Effects: Constructs an empty multimap using the specified comparison object and allocator, and inserts elements from the ordered range [first ,last). More...
 
 multimap (std::initializer_list< value_type > il, const Compare &comp=Compare(), const allocator_type &a=allocator_type())
 Effects: Constructs an empty multimap using the specified comparison object and allocator, and inserts elements from the range [il.begin(), il.end()). More...
 
 multimap (ordered_range_t, std::initializer_list< value_type > il, const Compare &comp=Compare(), const allocator_type &a=allocator_type())
 
 multimap (const multimap &x)
 Effects: Copy constructs a multimap. More...
 
 multimap (BOOST_RV_REF(multimap) x)
 Effects: Move constructs a multimap. More...
 
 multimap (const multimap &x, const allocator_type &a)
 Effects: Copy constructs a multimap. More...
 
 multimap (BOOST_RV_REF(multimap) x, const allocator_type &a)
 Effects: Move constructs a multimap using the specified allocator. More...
 
multimapoperator= (BOOST_COPY_ASSIGN_REF(multimap) x)
 Effects: Makes *this a copy of x. More...
 
multimapoperator= (BOOST_RV_REF(multimap) x)
 Effects: this->swap(x.get()). More...
 
multimapoperator= (std::initializer_list< value_type > il)
 Effects: Assign content of il to *this. More...
 
iterator insert (const value_type &x)
 Effects: Inserts x and returns the iterator pointing to the newly inserted element. More...
 
iterator insert (const nonconst_value_type &x)
 Effects: Inserts a new value constructed from x and returns the iterator pointing to the newly inserted element. More...
 
iterator insert (BOOST_RV_REF(nonconst_value_type) x)
 Effects: Inserts a new value move-constructed from x and returns the iterator pointing to the newly inserted element. More...
 
iterator insert (BOOST_RV_REF(movable_value_type) x)
 Effects: Inserts a new value move-constructed from x and returns the iterator pointing to the newly inserted element. More...
 
iterator insert (const_iterator p, const value_type &x)
 Effects: Inserts a copy of x in the container. More...
 
iterator insert (const_iterator p, const nonconst_value_type &x)
 Effects: Inserts a new value constructed from x in the container. More...
 
iterator insert (const_iterator p, BOOST_RV_REF(nonconst_value_type) x)
 Effects: Inserts a new value move constructed from x in the container. More...
 
iterator insert (const_iterator p, BOOST_RV_REF(movable_value_type) x)
 Effects: Inserts a new value move constructed from x in the container. More...
 
template<class InputIterator >
void insert (InputIterator first, InputIterator last)
 Requires: first, last are not iterators into *this. More...
 
void insert (std::initializer_list< value_type > il)
 Effects: inserts each element from the range [il.begin(), il.end(). More...
 

Member Typedef Documentation

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
typedef Allocator boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::allocator_type
template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
typedef boost::container::allocator_traits<Allocator>::const_pointer boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::const_pointer
template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
typedef boost::container::allocator_traits<Allocator>::const_reference boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::const_reference
template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
typedef boost::container::allocator_traits<Allocator>::difference_type boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::difference_type
template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
typedef Compare boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::key_compare
template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
typedef Key boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::key_type
template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
typedef T boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::mapped_type
template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
typedef std::pair<key_type, mapped_type> boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::nonconst_value_type
template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
typedef boost::container::allocator_traits<Allocator>::pointer boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::pointer
template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
typedef boost::container::allocator_traits<Allocator>::reference boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::reference
template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
typedef boost::container::allocator_traits<Allocator>::size_type boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::size_type
template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
typedef std::pair<const Key, T> boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::value_type

Constructor & Destructor Documentation

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::multimap ( )
inline

Effects: Default constructs an empty multimap.

Complexity: Constant.

References boost::BOOST_STATIC_ASSERT(), and boost::program_options::value().

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::multimap ( const Compare &  comp,
const allocator_type a = allocator_type() 
)
inlineexplicit

Effects: Constructs an empty multimap using the specified allocator.

Complexity: Constant.

References boost::BOOST_STATIC_ASSERT(), and boost::program_options::value().

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::multimap ( const allocator_type a)
inlineexplicit

Effects: Constructs an empty multimap using the specified comparison object and allocator.

Complexity: Constant.

References boost::BOOST_STATIC_ASSERT(), and boost::program_options::value().

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
template<class InputIterator >
boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::multimap ( InputIterator  first,
InputIterator  last,
const Compare &  comp = Compare(),
const allocator_type a = allocator_type() 
)
inline

Effects: Constructs an empty multimap using the specified comparison object and allocator, and inserts elements from the range [first ,last ).

Complexity: Linear in N if the range [first ,last ) is already sorted using comp and otherwise N logN, where N is last - first.

References boost::BOOST_STATIC_ASSERT(), and boost::program_options::value().

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
template<class InputIterator >
boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::multimap ( ordered_range_t  ,
InputIterator  first,
InputIterator  last,
const Compare &  comp = Compare(),
const allocator_type a = allocator_type() 
)
inline

Effects: Constructs an empty multimap using the specified comparison object and allocator, and inserts elements from the ordered range [first ,last).

This function is more efficient than the normal range creation for ordered ranges.

Requires: [first ,last) must be ordered according to the predicate.

Complexity: Linear in N.

Note: Non-standard extension.

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::multimap ( std::initializer_list< value_type il,
const Compare &  comp = Compare(),
const allocator_type a = allocator_type() 
)
inline

Effects: Constructs an empty multimap using the specified comparison object and allocator, and inserts elements from the range [il.begin(), il.end()).

Complexity: Linear in N if the range [first ,last ) is already sorted using comp and otherwise N logN, where N is il.first() - il.end().

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::multimap ( ordered_range_t  ,
std::initializer_list< value_type il,
const Compare &  comp = Compare(),
const allocator_type a = allocator_type() 
)
inline
template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::multimap ( const multimap< Key, T, Compare, Allocator, MultiMapOptions > &  x)
inline

Effects: Copy constructs a multimap.

Complexity: Linear in x.size().

References boost::BOOST_STATIC_ASSERT(), and boost::program_options::value().

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::multimap ( BOOST_RV_REF(multimap< Key, T, Compare, Allocator, MultiMapOptions >)  x)
inline

Effects: Move constructs a multimap.

Constructs *this using x's resources.

Complexity: Constant.

Postcondition: x is emptied.

References boost::BOOST_STATIC_ASSERT(), and boost::program_options::value().

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::multimap ( const multimap< Key, T, Compare, Allocator, MultiMapOptions > &  x,
const allocator_type a 
)
inline

Effects: Copy constructs a multimap.

Complexity: Linear in x.size().

References boost::BOOST_STATIC_ASSERT(), and boost::program_options::value().

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::multimap ( BOOST_RV_REF(multimap< Key, T, Compare, Allocator, MultiMapOptions >)  x,
const allocator_type a 
)
inline

Effects: Move constructs a multimap using the specified allocator.

Constructs *this using x's resources. Complexity: Constant if a == x.get_allocator(), linear otherwise.

Postcondition: x is emptied.

References boost::BOOST_STATIC_ASSERT(), and boost::program_options::value().

Member Function Documentation

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
typedef boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::BOOST_CONTAINER_IMPDEF ( base_t::stored_allocator_type  )
template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
typedef boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::BOOST_CONTAINER_IMPDEF ( value_compare_impl  )
template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
typedef boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::BOOST_CONTAINER_IMPDEF ( base_t::iterator  )
template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
typedef boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::BOOST_CONTAINER_IMPDEF ( base_t::const_iterator  ) const
template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
typedef boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::BOOST_CONTAINER_IMPDEF ( base_t::reverse_iterator  )
template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
typedef boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::BOOST_CONTAINER_IMPDEF ( base_t::const_reverse_iterator  ) const
template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
typedef boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::BOOST_CONTAINER_IMPDEF ( movable_value_type_impl  )
template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
iterator boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::insert ( const value_type x)
inline

Effects: Inserts x and returns the iterator pointing to the newly inserted element.

Complexity: Logarithmic.

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
iterator boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::insert ( const nonconst_value_type x)
inline

Effects: Inserts a new value constructed from x and returns the iterator pointing to the newly inserted element.

Complexity: Logarithmic.

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
iterator boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::insert ( BOOST_RV_REF(nonconst_value_type x)
inline

Effects: Inserts a new value move-constructed from x and returns the iterator pointing to the newly inserted element.

Complexity: Logarithmic.

References boost::move().

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
iterator boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::insert ( BOOST_RV_REF(movable_value_type)  x)
inline

Effects: Inserts a new value move-constructed from x and returns the iterator pointing to the newly inserted element.

Complexity: Logarithmic.

References boost::move().

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
iterator boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::insert ( const_iterator  p,
const value_type x 
)
inline

Effects: Inserts a copy of x in the container.

p is a hint pointing to where the insert should start to search.

Returns: An iterator pointing to the element with key equivalent to the key of x.

Complexity: Logarithmic in general, but amortized constant if t is inserted right before p.

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
iterator boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::insert ( const_iterator  p,
const nonconst_value_type x 
)
inline

Effects: Inserts a new value constructed from x in the container.

p is a hint pointing to where the insert should start to search.

Returns: An iterator pointing to the element with key equivalent to the key of x.

Complexity: Logarithmic in general, but amortized constant if t is inserted right before p.

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
iterator boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::insert ( const_iterator  p,
BOOST_RV_REF(nonconst_value_type x 
)
inline

Effects: Inserts a new value move constructed from x in the container.

p is a hint pointing to where the insert should start to search.

Returns: An iterator pointing to the element with key equivalent to the key of x.

Complexity: Logarithmic in general, but amortized constant if t is inserted right before p.

References boost::move().

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
iterator boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::insert ( const_iterator  p,
BOOST_RV_REF(movable_value_type)  x 
)
inline

Effects: Inserts a new value move constructed from x in the container.

p is a hint pointing to where the insert should start to search.

Returns: An iterator pointing to the element with key equivalent to the key of x.

Complexity: Logarithmic in general, but amortized constant if t is inserted right before p.

References boost::move().

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
template<class InputIterator >
void boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::insert ( InputIterator  first,
InputIterator  last 
)
inline

Requires: first, last are not iterators into *this.

Effects: inserts each element from the range [first,last) .

Complexity: At most N log(size()+N) (N is the distance from first to last)

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
void boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::insert ( std::initializer_list< value_type il)
inline

Effects: inserts each element from the range [il.begin(), il.end().

Complexity: At most N log(size()+N) (N is the distance from il.begin() to il.end())

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
multimap& boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::operator= ( BOOST_COPY_ASSIGN_REF(multimap< Key, T, Compare, Allocator, MultiMapOptions >)  x)
inline

Effects: Makes *this a copy of x.

Complexity: Linear in x.size().

References boost::multiprecision::backends::operator=().

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
multimap& boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::operator= ( BOOST_RV_REF(multimap< Key, T, Compare, Allocator, MultiMapOptions >)  x)
inline

Effects: this->swap(x.get()).

Complexity: Constant.

References boost::move(), and boost::multiprecision::backends::operator=().

template<class Key , class T , class Compare , class Allocator , class MultiMapOptions >
multimap& boost::container::multimap< Key, T, Compare, Allocator, MultiMapOptions >::operator= ( std::initializer_list< value_type il)
inline

Effects: Assign content of il to *this.


The documentation for this class was generated from the following files: