template<typename InIt>
void assign(InIt first, InIt last BOOST_CONTAINER_DOCIGN);
Effects: Assigns the the range [first, last) to *this.
Throws: If memory allocation throws or T's copy/move constructor/assignment or T's constructor/assignment from dereferencing InpIt throws.
Complexity: Linear to n.
void assign(std::initializer_list< T > il);
Effects: Assigns the the range [il.begin(), il.end()) to *this.
Throws: If memory allocation throws or T's constructor from dereferencing iniializer_list iterator throws.
template<typename FwdIt>
void assign(FwdIt first, FwdIt last BOOST_CONTAINER_DOCIGN);
Effects: Assigns the the range [first, last) to *this.
Throws: If memory allocation throws or T's copy/move constructor/assignment or T's constructor/assignment from dereferencing InpIt throws.
Complexity: Linear to n.
void assign(size_type n, const value_type & val);
Effects: Assigns the n copies of val to *this.
Throws: If memory allocation throws or T's copy/move constructor/assignment throws.
Complexity: Linear to n.
allocator_type get_allocator() const noexcept;
Effects: Returns a copy of the internal allocator.
Throws: If allocator's copy constructor throws.
Complexity: Constant.
stored_allocator_type & get_stored_allocator() noexcept;
Effects: Returns a reference to the internal allocator.
Throws: Nothing
Complexity: Constant.
Note: Non-standard extension.
const stored_allocator_type & get_stored_allocator() const noexcept;
Effects: Returns a reference to the internal allocator.
Throws: Nothing
Complexity: Constant.
Note: Non-standard extension.
iterator begin() noexcept;
Effects: Returns an iterator to the first element contained in the vector.
Throws: Nothing.
Complexity: Constant.
const_iterator begin() const noexcept;
Effects: Returns a const_iterator to the first element contained in the vector.
Throws: Nothing.
Complexity: Constant.
Effects: Возвращает итератор к концу вектора.
Throws: Nothing.
комплексность: Постоян.
Effects: Returns an iterator to the end of the vector.
Throws: Nothing.
Complexity: Constant.
[ORIG_END] -->const_iterator end() const noexcept;
Effects: Returns a const_iterator to the end of the vector.
Throws: Nothing.
Complexity: Constant.
reverse_iterator rbegin() noexcept;
Effects: Returns a reverse_iterator pointing to the beginning of the reversed vector.
Throws: Nothing.
Complexity: Constant.
const_reverse_iterator rbegin() const noexcept;
Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed vector.
Throws: Nothing.
Complexity: Constant.
reverse_iterator rend() noexcept;
Effects: Returns a reverse_iterator pointing to the end of the reversed vector.
Throws: Nothing.
Complexity: Constant.
const_reverse_iterator rend() const noexcept;
Effects: Returns a const_reverse_iterator pointing to the end of the reversed vector.
Throws: Nothing.
Complexity: Constant.
Effects: Description
Throws: Nothing.
комплексность: Постоян.
Effects: Returns a const_iterator to the first element contained in the vector.
Throws: Nothing.
Complexity: Constant.
[ORIG_END] -->const_iterator cend() const noexcept;
Effects: Returns a const_iterator to the end of the vector.
Throws: Nothing.
Complexity: Constant.
const_reverse_iterator crbegin() const noexcept;
Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed vector.
Throws: Nothing.
Complexity: Constant.
const_reverse_iterator crend() const noexcept;
Effects: Returns a const_reverse_iterator pointing to the end of the reversed vector.
Throws: Nothing.
Complexity: Constant.
bool empty() const noexcept;
Effects: Returns true if the vector contains no elements.
Throws: Nothing.
Complexity: Constant.
size_type size() const noexcept;
Effects: Returns the number of the elements contained in the vector.
Throws: Nothing.
Complexity: Constant.
size_type max_size() const noexcept;
Effects: Returns the largest possible size of the vector.
Throws: Nothing.
Complexity: Constant.
Effects: Вставляет или стирает элементы в конце, так что размер становится n. Новые элементы инициализируются.
Throws: Если распределение памяти бросается, или T's copy/move или значение инициализации бросает.
комплексность:
Effects: Inserts or erases elements at the end such that the size becomes n. New elements are value initialized.
Throws: If memory allocation throws, or T's copy/move or value initialization throws.
Complexity: Linear to the difference between size() and new_size.
[ORIG_END] -->void resize(size_type new_size, default_init_t);
Effects: Inserts or erases elements at the end such that the size becomes n. New elements are default initialized.
Throws: If memory allocation throws, or T's copy/move or default initialization throws.
Complexity: Linear to the difference between size() and new_size.
Note: Non-standard extension
void resize(size_type new_size, const T & x);
Effects: Inserts or erases elements at the end such that the size becomes n. New elements are copy constructed from x.
Throws: If memory allocation throws, or T's copy/move constructor throws.
Complexity: Linear to the difference between size() and new_size.
size_type capacity() const noexcept;
Effects: Number of elements for which memory has been allocated. capacity() is always greater than or equal to size().
Throws: Nothing.
Complexity: Constant.
void reserve(size_type new_cap);
Effects: 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.
Throws: If memory allocation allocation throws or T's copy/move constructor throws.
Effects: Пытается справиться с избытком памяти, созданным при предыдущих ассигнованиях. Размер вектора не изменился
Throws: Если выбрасывается распределение памяти, или выбрасывается конструктор копирования/движения T.
комплексность: Linear to size().
Effects: Tries to deallocate the excess of memory created with previous allocations. The size of the vector is unchanged
Throws: If memory allocation throws, or T's copy/move constructor throws.
Complexity: Linear to size().
[ORIG_END] -->reference front() noexcept;
Requires: !empty()
Effects: Returns a reference to the first element of the container.
Throws: Nothing.
Complexity: Constant.
const_reference front() const noexcept;
Requires: !empty()
Effects: Returns a const reference to the first element of the container.
Throws: Nothing.
Complexity: Constant.
Requires: !empty()
Effects: Возвращает ссылку на последний элемент контейнера.
Throws: Nothing.
комплексность: Постоян.
Requires: !empty()
Effects: Returns a reference to the last element of the container.
Throws: Nothing.
Complexity: Constant.
[ORIG_END] -->const_reference back() const noexcept;
Requires: !empty()
Effects: Returns a const reference to the last element of the container.
Throws: Nothing.
Complexity: Constant.
reference operator[](size_type n) noexcept;
Requires: size() > n.
Effects: Returns a reference to the nth element from the beginning of the container.
Throws: Nothing.
Complexity: Constant.
const_reference operator[](size_type n) const noexcept;
Requires: size() > n.
Effects: Returns a const reference to the nth element from the beginning of the container.
Throws: Nothing.
Complexity: Constant.
iterator nth(size_type n) noexcept;
Requires: size() >= n.
Effects: Returns an iterator to the nth element from the beginning of the container. Returns end() if n == size().
Throws: Nothing.
Complexity: Constant.
Note: Non-standard extension
const_iterator nth(size_type n) const noexcept;
Requires: size() >= n.
Effects: Returns a const_iterator to the nth element from the beginning of the container. Returns end() if n == size().
Throws: Nothing.
Complexity: Constant.
Note: Non-standard extension
size_type index_of(iterator p) noexcept;
Requires: begin() <= p <= end().
Effects: Returns the index of the element pointed by p and size() if p == end().
Throws: Nothing.
Complexity: Constant.
Note: Non-standard extension
size_type index_of(const_iterator p) const noexcept;
Requires: begin() <= p <= end().
Effects: Returns the index of the element pointed by p and size() if p == end().
Throws: Nothing.
Complexity: Constant.
Note: Non-standard extension
reference at(size_type n);
Requires: size() > n.
Effects: Returns a reference to the nth element from the beginning of the container.
Throws: std::range_error if n >= size()
Complexity: Constant.
const_reference at(size_type n) const;
Requires: size() > n.
Effects: Returns a const reference to the nth element from the beginning of the container.
Throws: std::range_error if n >= size()
Complexity: Constant.
T * data() noexcept;
Returns: A pointer such that [data(),data() + size()) is a valid range. For a non-empty vector, data() == &front().
Throws: Nothing.
Complexity: Constant.
const T * data() const noexcept;
Returns: A pointer such that [data(),data() + size()) is a valid range. For a non-empty vector, data() == &front().
Throws: Nothing.
Complexity: Constant.
template<class... Args> reference emplace_back(Args &&... args);
Effects: Inserts an object of type T constructed with std::forward<Args>(args)... in the end of the vector.
Returns: A reference to the created object.
Throws: If memory allocation throws or the in-place constructor throws or T's copy/move constructor throws.
Complexity: Amortized constant time.
template<class... Args> bool stable_emplace_back(Args &&... args);
Effects: Inserts an object of type T constructed with std::forward<Args>(args)... in the end of the vector.
Throws: If the in-place constructor throws.
Complexity: Constant time.
Note: Non-standard extension.
template<class... Args>
iterator emplace(const_iterator position, Args &&... args);
Requires: position must be a valid iterator of *this.
Effects: Inserts an object of type T constructed with std::forward<Args>(args)... before position
Throws: If memory allocation throws or the in-place constructor throws or T's copy/move constructor/assignment throws.
Complexity: If position is end(), amortized constant time Linear time otherwise.
void push_back(const T & x);
Effects: Inserts a copy of x at the end of the vector.
Throws: If memory allocation throws or T's copy/move constructor throws.
Complexity: Amortized constant time.
void push_back(T && x);
Effects: Constructs a new element in the end of the vector and moves the resources of x to this new element.
Throws: If memory allocation throws or T's copy/move constructor throws.
Complexity: Amortized constant time.
iterator insert(const_iterator position, const T & x);
Requires: position must be a valid iterator of *this.
Effects: Insert a copy of x before position.
Throws: If memory allocation throws or T's copy/move constructor/assignment throws.
Complexity: If position is end(), amortized constant time Linear time otherwise.
iterator insert(const_iterator position, T && x);
Requires: position must be a valid iterator of *this.
Effects: Insert a new element before position with x's resources.
Throws: If memory allocation throws.
Complexity: If position is end(), amortized constant time Linear time otherwise.
iterator insert(const_iterator p, size_type n, const T & x);
Requires: p must be a valid iterator of *this.
Effects: Insert n copies of x before pos.
Returns: an iterator to the first inserted element or p if n is 0.
Throws: If memory allocation throws or T's copy/move constructor throws.
Complexity: Linear to n.
template<typename InIt>
iterator insert(const_iterator pos, InIt first, InIt last);
Requires: p must be a valid iterator of *this.
Effects: Insert a copy of the [first, last) range before pos.
Returns: an iterator to the first inserted element or pos if first == last.
Throws: If memory allocation throws, T's constructor from a dereferenced InpIt throws or T's copy/move constructor/assignment throws.
Complexity: Linear to boost::container::iterator_distance [first, last).
iterator insert(const_iterator position,
std::initializer_list< value_type > il);
Requires: p must be a valid iterator of *this. num, must be equal to boost::container::iterator_distance(first, last)
Effects: Insert a copy of the [first, last) range before pos.
Returns: an iterator to the first inserted element or pos if first == last.
Throws: If memory allocation throws, T's constructor from a dereferenced InpIt throws or T's copy/move constructor/assignment throws.
Complexity: Linear to boost::container::iterator_distance [first, last).
Note: This function avoids a linear operation to calculate boost::container::iterator_distance[first, last) for forward and bidirectional iterators, and a one by one insertion for input iterators. This is a a non-standard extension. Requires: position must be a valid iterator of *this.
Effects: Insert a copy of the [il.begin(), il.end()) range before position.
Returns: an iterator to the first inserted element or position if first == last.
Complexity: Linear to the range [il.begin(), il.end()).
void pop_back() noexcept;
Effects: Removes the last element from the container.
Throws: Nothing.
Complexity: Constant time.
Effects: Erases элемент в позиции pos.
Throws: Nothing.
комплексность: Линейный к элементам между pos и последним элементом. Постоян, если pos является последним элементом.
Effects: Erases the element at position pos.
Throws: Nothing.
Complexity: Linear to the elements between pos and the last element. Constant if pos is the last element.
[ORIG_END] -->iterator erase(const_iterator first, const_iterator last);
Effects: Erases the elements pointed by [first, last).
Throws: Nothing.
Complexity: Linear to the distance between first and last plus linear to the elements between pos and the last element.
void swap(vector & x) noexcept(((allocator_traits_type::propagate_on_container_swap::value||allocator_traits_type::is_always_equal::value)&&!container_detail::is_version< Allocator, 0 >::value)));
Effects: Swaps the contents of *this and x.
Throws: Nothing.
Complexity: Constant.
Effects: Эразирует все элементы вектора.
Throws: Nothing.
комплексность: Линейно к количеству элементов в контейнере.
Effects: Erases all the elements of the vector.
Throws: Nothing.
Complexity: Linear to the number of elements in the container.
[ORIG_END] -->