allocator_type get_allocator() const;
Effects: Returns a copy of the allocator that was passed to the object's constructor.
Complexity: Constant.
stored_allocator_type & get_stored_allocator();
Effects: Returns a reference to the internal allocator.
Throws: Nothing
Complexity: Constant.
Note: Non-standard extension.
const stored_allocator_type & get_stored_allocator() const;
Effects: Returns a reference to the internal allocator.
Throws: Nothing
Complexity: Constant.
Note: Non-standard extension.
iterator begin();
Effects: Returns an iterator to the first element contained in the container.
Throws: Nothing.
Complexity: Constant
const_iterator begin() const;
Effects: Returns a const_iterator to the first element contained in the container.
Throws: Nothing.
Complexity: Constant.
const_iterator cbegin() const;
Effects: Returns a const_iterator to the first element contained in the container.
Throws: Nothing.
Complexity: Constant.
Effects: Возвращает итератор к концу контейнера.
Throws: Nothing.
комплексность: Постоян.
Effects: Returns an iterator to the end of the container.
Throws: Nothing.
Complexity: Constant.
[ORIG_END] -->Effects: Возвращает конструктор к концу контейнера.
Throws: Nothing.
комплексность: Постоян.
Effects: Returns a const_iterator to the end of the container.
Throws: Nothing.
Complexity: Constant.
[ORIG_END] -->const_iterator cend() const noexcept;
Effects: Returns a const_iterator to the end of the container.
Throws: Nothing.
Complexity: Constant.
reverse_iterator rbegin() noexcept;
Effects: Returns a reverse_iterator pointing to the beginning of the reversed container.
Throws: Nothing.
Complexity: Constant.
const_reverse_iterator rbegin() const noexcept;
Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.
Throws: Nothing.
Complexity: Constant.
const_reverse_iterator crbegin() const noexcept;
Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.
Throws: Nothing.
Complexity: Constant.
reverse_iterator rend() noexcept;
Effects: Returns a reverse_iterator pointing to the end of the reversed container.
Throws: Nothing.
Complexity: Constant.
const_reverse_iterator rend() const noexcept;
Effects: Returns a const_reverse_iterator pointing to the end of the reversed container.
Throws: Nothing.
Complexity: Constant.
const_reverse_iterator crend() const noexcept;
Effects: Returns a const_reverse_iterator pointing to the end of the reversed container.
Throws: Nothing.
Complexity: Constant.
bool empty() const;
Effects: Returns true if the container contains no elements.
Throws: Nothing.
Complexity: Constant.
size_type size() const;
Effects: Returns the number of the elements contained in the container.
Throws: Nothing.
Complexity: Constant.
size_type max_size() const;
Effects: Returns the largest possible size of the container.
Throws: Nothing.
Complexity: Constant.
template<class... Args> iterator emplace(Args &&... args);
Effects: 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.
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.
Effects: Вставка объекта типа T, построенного с std::forward(args)... в контейнере. p - это намек, указывающий на то, где вставка должна начать поиск.
Returns: Итератор, указывающий на элемент с ключом, эквивалентным ключу x.
комплексность: Logarithmic в целом, но амортизированная постоянная, если t вставляется прямо перед p.
Effects: 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.
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.
[ORIG_END] -->Effects: Вставляет x и возвращает итератор, указывающий на вновь вставленный элемент.
комплексность: Logarithmic.
Effects: Inserts x and returns the iterator pointing to the newly inserted element.
Complexity: Logarithmic.
[ORIG_END] -->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.
Complexity: Logarithmic.
iterator insert(nonconst_value_type && x);
Effects: Inserts a new value move-constructed from x and returns the iterator pointing to the newly inserted element.
Complexity: Logarithmic.
Effects: Вставляет новое значение, построенное из x, и возвращает итератор, указывающий на вновь вставленный элемент.
комплексность: Logarithmic.
Effects: Inserts a new value move-constructed from x and returns the iterator pointing to the newly inserted element.
Complexity: Logarithmic.
[ORIG_END] -->iterator insert(const_iterator p, const value_type & x);
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.
iterator insert(const_iterator p, const nonconst_value_type & x);
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.
iterator insert(const_iterator p, nonconst_value_type && x);
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.
iterator insert(const_iterator p, movable_value_type && x);
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.
template<typename InputIterator>
void insert(InputIterator first, InputIterator last);
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)
void insert(std::initializer_list< value_type > il);
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())
Requires: nh пуст или это->get_allocator() == nh.get_allocator().
Effects/Returns: Если nh пуст, не имеет эффекта и возвращает конец (). В противном случае вставляет элемент, принадлежащий nh, и возвращает итератор, указывающий на вновь вставленный элемент. Если существует диапазон, содержащий элементы с ключами, эквивалентными nh.key(), элемент вставляется в конце этого диапазона. nh всегда опорожняется.
комплексность: Логорифмический
Requires: nh is empty or this->get_allocator() == nh.get_allocator().
Effects/Returns: If nh is empty, has no effect and returns end(). Otherwise, inserts the element owned by nh and returns an iterator pointing to the newly inserted element. If a range containing elements with keys equivalent to nh.key() exists, the element is inserted at the end of that range. nh is always emptied.
Complexity: Logarithmic
[ORIG_END] -->iterator insert(const_iterator hint, node_type && nh);
Effects: Same as insert(node_type && nh)
but the element is inserted as close as possible to the position just prior to "hint".
Complexity: logarithmic in general, but amortized constant if the element is inserted right before "hint".
iterator erase(const_iterator p);
Effects: Erases the element pointed to by p.
Returns: Returns an iterator pointing to the element immediately following q prior to the element being erased. If no such element exists, returns end().
Complexity: Amortized constant time
size_type erase(const key_type & x);
Effects: Erases all elements in the container with key equivalent to x.
Returns: Returns the number of erased elements.
Complexity: log(size()) + count(k)
iterator erase(const_iterator first, const_iterator last);
Effects: Erases all the elements in the range [first, last).
Returns: Returns last.
Complexity: log(size())+N where N is the distance from first to last.
node_type extract(const key_type & k);
Effects: Removes the first element in the container with key equivalent to k.
Returns: A node_type owning the element if found, otherwise an empty node_type.
Complexity: log(a.size()).
node_type extract(const_iterator position);
Effects: Removes the element pointed to by "position".
Returns: A node_type owning the element, otherwise an empty node_type.
Complexity: Amortized constant.
template<typename C2>
void merge(multimap< Key, T, C2, Allocator, Options > & source);
Requires: this->get_allocator() == source.get_allocator().
Effects: Extracts each element in source and insert it into a using the comparison object of *this.
Postcondition: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.
Throws: Nothing unless the comparison object throws.
Complexity: N log(a.size() + N) (N has the value source.size())
template<typename C2>
void merge(multimap< Key, T, C2, Allocator, Options > && source);
Requires: this->get_allocator() == source.get_allocator().
Effects: Extracts each element in source and insert it into a using the comparison object of *this.
Postcondition: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.
Throws: Nothing unless the comparison object throws.
Complexity: N log(a.size() + N) (N has the value source.size())
template<typename C2>
void merge(map< Key, T, C2, Allocator, Options > & source);
Requires: this->get_allocator() == source.get_allocator().
Effects: Extracts each element in source and insert it into a using the comparison object of *this.
Postcondition: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.
Throws: Nothing unless the comparison object throws.
Complexity: N log(a.size() + N) (N has the value source.size())
template<typename C2>
void merge(map< Key, T, C2, Allocator, Options > && source);
Requires: this->get_allocator() == source.get_allocator().
Effects: Extracts each element in source and insert it into a using the comparison object of *this.
Postcondition: Pointers and references to the transferred elements of source refer to those same elements but as members of *this. Iterators referring to the transferred elements will continue to refer to their elements, but they now behave as iterators into *this, not into source.
Throws: Nothing unless the comparison object throws.
Complexity: N log(a.size() + N) (N has the value source.size())
void swap(multiset & x) noexcept(allocator_traits_type::is_always_equal::value &&boost::container::container_detail::is_nothrow_swappable< Compare >::value));
Effects: Swaps the contents of *this and x.
Throws: Nothing.
Complexity: Constant.
void clear() noexcept;
Effects: erase(a.begin(),a.end()).
Postcondition: size() == 0.
Complexity: linear in size().
key_compare key_comp() const;
Effects: Returns the comparison object out of which a was constructed.
Complexity: Constant.
value_compare value_comp() const;
Effects: Returns an object of value_compare constructed out of the comparison object.
Complexity: Constant.
iterator find(const key_type & x);
Returns: An iterator pointing to an element with the key equivalent to x, or end() if such an element is not found.
Complexity: Logarithmic.
const_iterator find(const key_type & x) const;
Returns: A const iterator pointing to an element with the key equivalent to x, or end() if such an element is not found.
Complexity: Logarithmic.
size_type count(const key_type & x) const;
Returns: The number of elements with key equivalent to x.
Complexity: log(size())+count(k)
iterator lower_bound(const key_type & x);
Returns: An iterator pointing to the first element with key not less than k, or a.end() if such an element is not found.
Complexity: Logarithmic
Returns: Исследователь, указывающий на первый элемент с ключом не менее k или a.end(), если такой элемент не найден.
комплексность: Логорифмический
Returns: A const iterator pointing to the first element with key not less than k, or a.end() if such an element is not found.
Complexity: Logarithmic
[ORIG_END] -->iterator upper_bound(const key_type & x);
Returns: An iterator pointing to the first element with key not less than x, or end() if such an element is not found.
Complexity: Logarithmic
const_iterator upper_bound(const key_type & x) const;
Returns: A const iterator pointing to the first element with key not less than x, or end() if such an element is not found.
Complexity: Logarithmic
std::pair< iterator, iterator > equal_range(const key_type & x);
Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
Complexity: Logarithmic
std::pair< const_iterator, const_iterator >
equal_range(const key_type & x) const;
Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
Complexity: Logarithmic
void rebalance();
Effects: Rebalances the tree. It's a no-op for Red-Black and AVL trees.
Complexity: Linear