Boost.Container Header Reference
An STL node allocator that uses a modified DLMalloc as memory source.This node allocator shares a segregated storage between all instances of adaptive_pool with equal sizeof(T).NodesPerBlock is the number of nodes allocated at once when the allocator needs runs out of nodes. MaxFreeBlocks is the maximum number of totally free blocks that the adaptive node pool will hold. The rest of the totally free blocks will be deallocated to the memory manager.OverheadPercent is the (approximated) maximum size overhead (1-20%) of the allocator: (memory usable for nodes / total memory allocated from the memory allocator) Obtains adaptive_pool from adaptive_pool adaptive_pool< T2, NodesPerBlock, MaxFreeBlocks, OverheadPercent > If Version is 1, the allocator is a STL conforming allocator. If Version is 2, the allocator offers advanced expand in place and burst allocation capabilities. unsigned int adaptive_pool< T, NodesPerBlock, MaxFreeBlocks, OverheadPercent > T T * const T * ::boost::container::dtl::unvoid_ref< T >::type ::boost::container::dtl::unvoid_ref< const T >::type std::size_t std::ptrdiff_t boost::container::dtl::version_type< self_t, Version > const std::size_t const std::size_t const std::size_t const std::size_t BOOST_STATIC_ASSERT((Version<=2)) size_typeReturns the number of elements that could be allocated. Never throws pointersize_typeconst void *0Allocate memory for an array of count elements. Throws std::bad_alloc if there is no enough memory voidconst pointer &size_typeDeallocate allocated memory. Never throws pointerallocation_typesize_typesize_type &pointer & size_typepointerReturns maximum the number of objects the previously allocated memory pointed by p can hold. pointerAllocates just one object. Memory allocated with this function must be deallocated only with deallocate_one(). Throws bad_alloc if there is no enough memory voidstd::size_tmultiallocation_chain &Allocates many elements of size == 1. Elements must be individually deallocated with deallocate_one() voidpointerDeallocates memory previously allocated with allocate_one(). You should never use deallocate_one to deallocate memory allocated with other functions different from allocate_one(). Never throws voidmultiallocation_chain & voidsize_typestd::size_tmultiallocation_chain &Allocates many elements of size elem_size. Elements must be individually deallocated with deallocate() voidconst size_type *size_typemultiallocation_chain &Allocates n_elements elements, each one of size elem_sizes[i] Elements must be individually deallocated with deallocate() voidmultiallocation_chain & Default constructor. const adaptive_pool &Copy constructor from other adaptive_pool. const adaptive_pool< T2, NodesPerBlock, MaxFreeBlocks, OverheadPercent BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I Version)> &Copy constructor from related adaptive_pool. Destructor. voidDeallocates all free blocks of the pool. friend voidadaptive_pool &adaptive_pool &Swaps allocators. Does not throw. If each allocator is placed in a different memory segment, the result is undefined. friend boolconst adaptive_pool &const adaptive_pool &An allocator always compares to true, as memory allocated with one instance can be deallocated by another instance friend boolconst adaptive_pool &const adaptive_pool &An allocator always compares to false, as memory allocated with one instance can be deallocated by another instance pointerallocation_typestd::size_tsize_type &pointer & Obtains private_adaptive_pool from private_adaptive_pool private_adaptive_pool< T2, NodesPerBlock, MaxFreeBlocks, OverheadPercent > If Version is 1, the allocator is a STL conforming allocator. If Version is 2, the allocator offers advanced expand in place and burst allocation capabilities. unsigned int private_adaptive_pool< T, NodesPerBlock, MaxFreeBlocks, OverheadPercent > dtl::private_adaptive_node_pool< sizeof(T), NodesPerBlock, MaxFreeBlocks, OverheadPercent > T T * const T * ::boost::container::dtl::unvoid_ref< T >::type ::boost::container::dtl::unvoid_ref< const T >::type std::size_t std::ptrdiff_t boost::container::dtl::version_type< self_t, Version > const std::size_t const std::size_t const std::size_t const std::size_t pool_t BOOST_STATIC_ASSERT((Version<=2)) size_typeReturns the number of elements that could be allocated. Never throws pointersize_typeconst void *0Allocate memory for an array of count elements. Throws std::bad_alloc if there is no enough memory voidconst pointer &size_typeDeallocate allocated memory. Never throws pointerallocation_typesize_typesize_type &pointer & size_typepointerReturns maximum the number of objects the previously allocated memory pointed by p can hold. pointerAllocates just one object. Memory allocated with this function must be deallocated only with deallocate_one(). Throws bad_alloc if there is no enough memory voidstd::size_tmultiallocation_chain &Allocates many elements of size == 1. Elements must be individually deallocated with deallocate_one() voidpointerDeallocates memory previously allocated with allocate_one(). You should never use deallocate_one to deallocate memory allocated with other functions different from allocate_one(). Never throws voidmultiallocation_chain & voidsize_typestd::size_tmultiallocation_chain &Allocates many elements of size elem_size. Elements must be individually deallocated with deallocate() voidconst size_type *size_typemultiallocation_chain &Allocates n_elements elements, each one of size elem_sizes[i] Elements must be individually deallocated with deallocate() voidmultiallocation_chain & voidDeallocates all free blocks of the pool. Default constructor. const private_adaptive_pool &Copy constructor from other private_adaptive_pool. const private_adaptive_pool< T2, NodesPerBlock, MaxFreeBlocks, OverheadPercent BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I Version)> &Copy constructor from related private_adaptive_pool. Destructor. friend voidprivate_adaptive_pool &private_adaptive_pool &Swaps allocators. Does not throw. If each allocator is placed in a different memory segment, the result is undefined. friend boolconst private_adaptive_pool &const private_adaptive_pool &An allocator always compares to true, as memory allocated with one instance can be deallocated by another instance friend boolconst private_adaptive_pool &const private_adaptive_pool &An allocator always compares to false, as memory allocated with one instance can be deallocated by another instance pointerallocation_typestd::size_tsize_type &pointer &
This class is an extended STL-compatible that offers advanced allocation mechanism (in-place expansion, shrinking, burst-allocation...)This allocator is a wrapper around a modified DLmalloc. If Version is 1, the allocator is a STL conforming allocator. If Version is 2, the allocator offers advanced expand in place and burst allocation capabilities.AllocationDisableMask works only if Version is 2 and it can be an inclusive OR of allocation types the user wants to disable. Obtains an allocator that allocates objects of type T2 allocator< T2, Version, AllocationDisableMask > T T * const T * T & const T & std::size_t std::ptrdiff_t boost::container::dtl::version_type< self_t, Version > pointersize_typeconst void *0Allocates memory for an array of count elements. Throws std::bad_alloc if there is no enough memory If Version is 2, this allocated memory can only be deallocated with deallocate() or (for Version == 2) deallocate_many() voidpointersize_typeDeallocates previously allocated memory. Never throws size_typeReturns the maximum number of elements that could be allocated. Never throws pointerallocation_typesize_typesize_type &pointer &An advanced function that offers in-place expansion shrink to fit and new allocation capabilities. Memory allocated with this function can only be deallocated with deallocate() or deallocate_many(). This function is available only with Version == 2 size_typepointerReturns maximum the number of objects the previously allocated memory pointed by p can hold. Memory must not have been allocated with allocate_one or allocate_individual. This function is available only with Version == 2 pointerAllocates just one object. Memory allocated with this function must be deallocated only with deallocate_one(). Throws bad_alloc if there is no enough memory This function is available only with Version == 2 voidstd::size_tmultiallocation_chain &Allocates many elements of size == 1. Elements must be individually deallocated with deallocate_one() This function is available only with Version == 2 voidpointerDeallocates memory previously allocated with allocate_one(). You should never use deallocate_one to deallocate memory allocated with other functions different from allocate_one() or allocate_individual. voidmultiallocation_chain &Deallocates memory allocated with allocate_one() or allocate_individual(). This function is available only with Version == 2 voidsize_typestd::size_tmultiallocation_chain &Allocates many elements of size elem_size. Elements must be individually deallocated with deallocate() This function is available only with Version == 2 voidconst size_type *size_typemultiallocation_chain &Allocates n_elements elements, each one of size elem_sizes[i] Elements must be individually deallocated with deallocate() This function is available only with Version == 2 voidmultiallocation_chain &Deallocates several elements allocated by allocate_many(), allocate(), or allocation_command(). This function is available only with Version == 2 Default constructor Never throws const allocator &Constructor from other allocator. Never throws const allocator< T2 > &Constructor from related allocator. Never throws friend voidself_t &self_t &Swaps two allocators, does nothing because this allocator is stateless friend boolconst allocator &const allocator &An allocator always compares to true, as memory allocated with one instance can be deallocated by another instance friend boolconst allocator &const allocator &An allocator always compares to false, as memory allocated with one instance can be deallocated by another instance pointerallocation_typestd::size_tsize_type &pointer &
The class template allocator_traits supplies a uniform interface to all allocator types. This class is a C++03-compatible implementation of std::allocator_traits Non-standard extension: Portable allocator rebind for C++03 and C++11 compilers. type is an allocator related to Allocator deduced deduced by rules explained in rebind_alloc. see_documentation Allocator allocator_type::value_type Allocator::pointer if such a type exists; otherwise, value_type* unspecified Allocator::const_pointer if such a type exists ; otherwise, pointer_traits<pointer>::rebind<const see_documentation Non-standard extension Allocator::reference if such a type exists; otherwise, value_type& see_documentation Non-standard extension Allocator::const_reference if such a type exists ; otherwise, const value_type& see_documentation Allocator::void_pointer if such a type exists ; otherwise, pointer_traits<pointer>::rebind<void>. see_documentation Allocator::const_void_pointer if such a type exists ; otherwise, pointer_traits<pointer>::rebind<const see_documentation Allocator::difference_type if such a type exists ; otherwise, pointer_traits<pointer>::difference_type. see_documentation Allocator::size_type if such a type exists ; otherwise, make_unsigned<difference_type>::type see_documentation Allocator::propagate_on_container_copy_assignment if such a type exists, otherwise a type with an internal constant static boolean member value == false. see_documentation Allocator::propagate_on_container_move_assignment if such a type exists, otherwise a type with an internal constant static boolean member value == false. see_documentation Allocator::propagate_on_container_swap if such a type exists, otherwise a type with an internal constant static boolean member value == false. see_documentation Allocator::is_always_equal if such a type exists, otherwise a type with an internal constant static boolean member value == is_empty<Allocator>::value see_documentation Allocator::is_partially_propagable if such a type exists, otherwise a type with an internal constant static boolean member value == false Note: Non-standard extension used to implement small_vector_allocator. see_documentation Defines an allocator: Allocator::rebind<T>::other if such a type exists; otherwise, Allocator<T, Args> if Allocator is a class template instantiation of the form Allocator<U, Args>, where Args is zero or more type arguments ; otherwise, the instantiation of rebind_alloc is ill-formed.In C++03 compilers rebind_alloc is a struct derived from an allocator deduced by previously detailed rules. see_documentation In C++03 compilers rebind_traits is a struct derived from allocator_traits<OtherAlloc>, where OtherAlloc is the allocator deduced by rules explained in rebind_alloc. allocator_traits< rebind_alloc< T > > pointerAllocator &size_typeReturns: a.allocate(n) voidAllocator &pointersize_typeReturns: a.deallocate(p, n)Throws: Nothing pointerAllocator &size_typeconst_void_pointerEffects: calls a.allocate(n, p) if that call is well-formed; otherwise, invokes a.allocate(n) voidAllocator &T *Effects: calls a.destroy(p) if that call is well-formed; otherwise, invokes p->~T(). size_typeconst Allocator &Returns: a.max_size() if that expression is well-formed; otherwise, numeric_limits<size_type>::max(). Allocatorconst Allocator &Returns: a.select_on_container_copy_construction() if that expression is well-formed; otherwise, a. voidAllocator &T *Args &&...Effects: calls a.construct(p, std::forward<Args>(args)...) if that call is well-formed; otherwise, invokes placement new (static_cast<void*>(p)) T(std::forward<Args>(args)...) boolconst Allocator &pointerReturns: a.storage_is_unpropagable(p) if is_partially_propagable::value is true; otherwise, false. boolconst Allocator &const Allocator &Returns: true if is_always_equal::value == true, otherwise, a == b.
This header file forward declares the following containers: boost::container::vector boost::container::stable_vector boost::container::static_vector boost::container::small_vector_base boost::container::small_vector boost::container::slist boost::container::list boost::container::set boost::container::multiset boost::container::map boost::container::multimap boost::container::flat_set boost::container::flat_multiset boost::container::flat_map boost::container::flat_multimap boost::container::basic_string boost::container::string boost::container::wstring Forward declares the following allocators: boost::container::allocator boost::container::node_allocator boost::container::adaptive_pool Forward declares the following polymorphic resource classes: boost::container::pmr::memory_resource boost::container::pmr::polymorphic_allocator boost::container::pmr::monotonic_buffer_resource boost::container::pmr::pool_options boost::container::pmr::unsynchronized_pool_resource boost::container::pmr::synchronized_pool_resource And finally it defines the following types Type used to tag that the inserted values should be default initialized Type used to tag that the input range is guaranteed to be ordered boost::container::ordered_range_tType used to tag that the input range is guaranteed to be ordered and unique const ordered_range_tValue used to tag that the input range is guaranteed to be ordered const ordered_unique_range_tValue used to tag that the input range is guaranteed to be ordered and unique const default_init_tValue used to tag that the inserted values should be default initialized
deque_base< real_allocator< T, Allocator >::type, Options >A double-ended queue is a sequence that supports random access to elements, constant time insertion and removal of elements at the end of the sequence, and linear time insertion and removal of elements in the middle. T ValAllocator ::boost::container::allocator_traits< ValAllocator >::pointer ::boost::container::allocator_traits< ValAllocator >::const_pointer ::boost::container::allocator_traits< ValAllocator >::reference ::boost::container::allocator_traits< ValAllocator >::const_reference ::boost::container::allocator_traits< ValAllocator >::size_type ::boost::container::allocator_traits< ValAllocator >::difference_type implementation_defined implementation_defined implementation_defined implementation_defined implementation_defined BOOST_CONSTEXPR size_type voidsize_typeconst T &Effects: Assigns the n copies of val to *this.Throws: If memory allocation throws or T's copy constructor throws.Complexity: Linear to n. voidInItInItEffects: Assigns the the range [first, last) to *this.Throws: If memory allocation throws or T's constructor from dereferencing InIt throws.Complexity: Linear to n. voidstd::initializer_list< value_type >Effects: Assigns the the range [il.begin(), il.end()) to *this.Throws: If memory allocation throws or T's constructor from dereferencing std::initializer_list iterator throws.Complexity: Linear to il.size(). allocator_typeEffects: Returns a copy of the internal allocator.Throws: If allocator's copy constructor throws.Complexity: Constant. const stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. iteratorEffects: Returns an iterator to the first element contained in the deque.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the deque.Throws: Nothing.Complexity: Constant. iteratorEffects: Returns an iterator to the end of the deque.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the deque.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the beginning of the reversed deque.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed deque.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the end of the reversed deque.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed deque.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the deque.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the deque.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed deque.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed deque.Throws: Nothing.Complexity: Constant. boolEffects: Returns true if the deque contains no elements.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the number of the elements contained in the deque.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the largest possible size of the deque.Throws: Nothing.Complexity: Constant. voidsize_typeEffects: 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 constructor throws.Complexity: Linear to the difference between size() and new_size. voidsize_typedefault_init_tEffects: 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 constructor throws.Complexity: Linear to the difference between size() and new_size.Note: Non-standard extension voidsize_typeconst value_type &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 constructor throws.Complexity: Linear to the difference between size() and new_size. voidEffects: Tries to deallocate the excess of memory created with previous allocations. The size of the deque is unchangedThrows: If memory allocation throws.Complexity: Constant. referenceRequires: !empty()Effects: Returns a reference to the first element of the container.Throws: Nothing.Complexity: Constant. const_referenceRequires: !empty()Effects: Returns a const reference to the first element from the beginning of the container.Throws: Nothing.Complexity: Constant. referenceRequires: !empty()Effects: Returns a reference to the last element of the container.Throws: Nothing.Complexity: Constant. const_referenceRequires: !empty()Effects: Returns a const reference to the last element of the container.Throws: Nothing.Complexity: Constant. referencesize_typeRequires: size() > n.Effects: Returns a reference to the nth element from the beginning of the container.Throws: Nothing.Complexity: Constant. const_referencesize_typeRequires: size() > n.Effects: Returns a const reference to the nth element from the beginning of the container.Throws: Nothing.Complexity: Constant. iteratorsize_typeRequires: 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_iteratorsize_typeRequires: 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_typeiteratorRequires: 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_typeconst_iteratorRequires: 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 referencesize_typeRequires: 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_referencesize_typeRequires: 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. referenceArgs &&...Effects: Inserts an object of type T constructed with std::forward<Args>(args)... in the beginning of the deque.Returns: A reference to the created object.Throws: If memory allocation throws or the in-place constructor throws.Complexity: Amortized constant time referenceArgs &&...Effects: Inserts an object of type T constructed with std::forward<Args>(args)... in the end of the deque.Returns: A reference to the created object.Throws: If memory allocation throws or the in-place constructor throws.Complexity: Amortized constant time iteratorconst_iteratorArgs &&...Requires: p must be a valid iterator of *this.Effects: Inserts an object of type T constructed with std::forward<Args>(args)... before pThrows: If memory allocation throws or the in-place constructor throws.Complexity: If p is end(), amortized constant time Linear time otherwise. voidconst T &Effects: Inserts a copy of x at the front of the deque.Throws: If memory allocation throws or T's copy constructor throws.Complexity: Amortized constant time. voidT &&Effects: Constructs a new element in the front of the deque and moves the resources of x to this new element.Throws: If memory allocation throws.Complexity: Amortized constant time. voidconst T &Effects: Inserts a copy of x at the end of the deque.Throws: If memory allocation throws or T's copy constructor throws.Complexity: Amortized constant time. voidT &&Effects: Constructs a new element in the end of the deque and moves the resources of x to this new element.Throws: If memory allocation throws.Complexity: Amortized constant time. iteratorconst_iteratorconst T &Requires: p must be a valid iterator of *this.Effects: Insert a copy of x before p.Returns: an iterator to the inserted element.Throws: If memory allocation throws or x's copy constructor throws.Complexity: If p is end(), amortized constant time Linear time otherwise. iteratorconst_iteratorT &&Requires: p must be a valid iterator of *this.Effects: Insert a new element before p with x's resources.Returns: an iterator to the inserted element.Throws: If memory allocation throws.Complexity: If p is end(), amortized constant time Linear time otherwise. iteratorconst_iteratorsize_typeconst value_type &Requires: pos must be a valid iterator of *this.Effects: Insert n copies of x before pos.Returns: an iterator to the first inserted element or pos if n is 0.Throws: If memory allocation throws or T's copy constructor throws.Complexity: Linear to n. iteratorconst_iteratorInItInItRequires: pos 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 InIt throws or T's copy constructor throws.Complexity: Linear to distance [first, last). iteratorconst_iteratorstd::initializer_list< value_type >Requires: pos must be a valid iterator of *this.Effects: Insert a copy of the [il.begin(), il.end()) range before pos.Returns: an iterator to the first inserted element or pos if il.begin() == il.end().Throws: If memory allocation throws, T's constructor from a dereferenced std::initializer_list throws or T's copy constructor throws.Complexity: Linear to distance [il.begin(), il.end()). voidEffects: Removes the first element from the deque.Throws: Nothing.Complexity: Constant time. voidEffects: Removes the last element from the deque.Throws: Nothing.Complexity: Constant time. iteratorconst_iteratorEffects: Erases the element at p.Throws: Nothing.Complexity: Linear to the elements between pos and the last element (if pos is near the end) or the first element if(pos is near the beginning). Constant if pos is the first or the last element. iteratorconst_iteratorconst_iteratorEffects: Erases the elements pointed by [first, last).Throws: Nothing.Complexity: Linear to the distance between first and last plus the elements between pos and the last element (if pos is near the end) or the first element if(pos is near the beginning). voiddeque &Effects: Swaps the contents of *this and x.Throws: Nothing.Complexity: Constant. voidEffects: Erases all the elements of the deque.Throws: Nothing.Complexity: Linear to the number of elements in the deque. Effects: Default constructors a deque.Throws: If allocator_type's default constructor throws.Complexity: Constant. const allocator_type &Effects: Constructs a deque taking the allocator as parameter.Throws: NothingComplexity: Constant. size_typeEffects: Constructs a deque and inserts n value initialized values.Throws: If allocator_type's default constructor throws or T's value initialization throws.Complexity: Linear to n. size_typedefault_init_tEffects: Constructs a deque and inserts n default initialized values.Throws: If allocator_type's default constructor throws or T's default initialization or copy constructor throws.Complexity: Linear to n.Note: Non-standard extension size_typeconst allocator_type &Effects: Constructs a deque that will use a copy of allocator a and inserts n value initialized values.Throws: If allocator_type's default constructor throws or T's value initialization throws.Complexity: Linear to n. size_typedefault_init_tconst allocator_type &Effects: Constructs a deque that will use a copy of allocator a and inserts n default initialized values.Throws: If allocator_type's default constructor throws or T's default initialization or copy constructor throws.Complexity: Linear to n.Note: Non-standard extension size_typeconst value_type &Effects: Constructs a deque that will use a copy of allocator a and inserts n copies of value.Throws: If allocator_type's default constructor throws or T's copy constructor throws.Complexity: Linear to n. size_typeconst value_type &const allocator_type &Effects: Constructs a deque that will use a copy of allocator a and inserts n copies of value.Throws: If allocator_type's default constructor throws or T's copy constructor throws.Complexity: Linear to n. InItInItEffects: Constructs a deque that will use a copy of allocator a and inserts a copy of the range [first, last) in the deque.Throws: If allocator_type's default constructor throws or T's constructor taking a dereferenced InIt throws.Complexity: Linear to the range [first, last). InItInItconst allocator_type &Effects: Constructs a deque that will use a copy of allocator a and inserts a copy of the range [first, last) in the deque.Throws: If allocator_type's default constructor throws or T's constructor taking a dereferenced InIt throws.Complexity: Linear to the range [first, last). std::initializer_list< value_type >const allocator_type &allocator_type()Effects: Constructs a deque that will use a copy of allocator a and inserts a copy of the range [il.begin(), il.end()) in the deque.Throws: If allocator_type's default constructor throws or T's constructor taking a dereferenced std::initializer_list iterator throws.Complexity: Linear to the range [il.begin(), il.end()). const deque &Effects: Copy constructs a deque.Postcondition: x == *this.Complexity: Linear to the elements x contains. deque &&Effects: Move constructor. Moves x's resources to *this.Throws: If allocator_type's copy constructor throws.Complexity: Constant. const deque &const allocator_type &Effects: Copy constructs a vector using the specified allocator.Postcondition: x == *this.Throws: If allocation throws or T's copy constructor throws.Complexity: Linear to the elements x contains. deque &&const allocator_type &Effects: Move constructor using the specified allocator. Moves x's resources to *this if a == allocator_type(). Otherwise copies values from x to *this.Throws: If allocation or T's copy constructor throws.Complexity: Constant if a == x.get_allocator(), linear otherwise. Effects: Destroys the deque. All stored values are destroyed and used memory is deallocated.Throws: Nothing.Complexity: Linear to the number of elements. deque &const deque &Effects: Makes *this contain the same elements as x.Postcondition: this->size() == x.size(). *this contains a copy of each of x's elements.Throws: If memory allocation throws or T's copy constructor throws.Complexity: Linear to the number of elements in x. deque &deque &&Effects: Move assignment. All x's values are transferred to *this.Throws: If allocator_traits_type::propagate_on_container_move_assignment is false and (allocation throws or value_type's move constructor throws)Complexity: Constant if allocator_traits_type:: propagate_on_container_move_assignment is true or this->get>allocator() == x.get_allocator(). Linear otherwise. deque &std::initializer_list< value_type >Effects: Makes *this contain the same elements as il.Postcondition: this->size() == il.size(). *this contains a copy of each of x's elements.Throws: If memory allocation throws or T's copy constructor throws.Complexity: Linear to the number of elements in il. friend boolconst deque &const deque &Effects: Returns true if x and y are equalComplexity: Linear to the number of elements in the container. friend boolconst deque &const deque &Effects: Returns true if x and y are unequalComplexity: Linear to the number of elements in the container. friend boolconst deque &const deque &Effects: Returns true if x is less than yComplexity: Linear to the number of elements in the container. friend boolconst deque &const deque &Effects: Returns true if x is greater than yComplexity: Linear to the number of elements in the container. friend boolconst deque &const deque &Effects: Returns true if x is equal or less than yComplexity: Linear to the number of elements in the container. friend boolconst deque &const deque &Effects: Returns true if x is equal or greater than yComplexity: Linear to the number of elements in the container. friend voiddeque &deque &Effects: x.swap(y)Complexity: Constant. InputIteratorInputIterator InputIteratorInputIteratorAllocator const &
A portable metafunction to obtain a deque that uses a polymorphic allocator boost::container::deque< T, polymorphic_allocator< T > > boost::container::deque< T, polymorphic_allocator< T > >
A flat_map is a kind of associative container that supports unique keys (contains at most one of each key value) and provides for fast retrieval of values of another type T based on the keys.A flat_map satisfies all of the requirements of a container, a reversible container and an associative container. A flat_map also provides most operations described for unique keys. For a flat_map<Key,T> the key_type is Key and the value_type is std::pair<Key,T> (unlike std::map<Key, T> which value_type is std::pair<const Key, T>).flat_map is similar to std::map but it's implemented by as an ordered sequence container. The underlying sequence container is by default vector but it can also work user-provided vector-like SequenceContainers (like static_vector or small_vector).Using vector-like sequence containers means that inserting a new element into a flat_map might invalidate previous iterators and references (unless that sequence container is stable_vector or a similar container that offers stable pointers and references). Similarly, erasing an element might invalidate iterators and references pointing to elements that come after (their keys are bigger) the erased element.This container provides random-access iterators. Key T Compare std::pair< Key, T > implementation_defined sequence_type::allocator_type ::boost::container::allocator_traits< allocator_type > sequence_type::pointer sequence_type::const_pointer sequence_type::reference sequence_type::const_reference sequence_type::size_type sequence_type::difference_type implementation_defined implementation_defined sequence_type::iterator sequence_type::const_iterator sequence_type::reverse_iterator sequence_type::const_reverse_iterator implementation_defined (dtl::is_same< std::pair< Key, T >, value_type >::value) allocator_typeEffects: Returns a copy of the allocator that was passed to the object's constructor.Complexity: Constant. get_stored_allocator_noconst_return_tEffects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. get_stored_allocator_const_return_tEffects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. iteratorEffects: Returns an iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant. iteratorEffects: Returns an iterator to the end of the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the container.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. boolEffects: Returns true if the container contains no elements.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the number of the elements contained in the container.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the largest possible size of the container.Throws: Nothing.Complexity: Constant. size_typeEffects: Number of elements for which memory has been allocated. capacity() is always greater than or equal to size().Throws: Nothing.Complexity: Constant. voidsize_typeEffects: If n is less than or equal to capacity(), or the underlying container has no reserve member, 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 constructor throws.Note: If capacity() is less than "cnt", iterators and references to to values might be invalidated. voidEffects: Tries to deallocate the excess of memory created Throws: If memory allocation throws, or T's copy constructor throws.Complexity: Linear to size(). mapped_type &const key_type &Effects: If there is no key equivalent to x in the flat_map, inserts value_type(x, T()) into the flat_map.Returns: A reference to the mapped_type corresponding to x in *this.Complexity: Logarithmic. mapped_type &key_type &&Effects: If there is no key equivalent to x in the flat_map, inserts value_type(move(x), T()) into the flat_map (the key is move-constructed)Returns: A reference to the mapped_type corresponding to x in *this.Complexity: Logarithmic. std::pair< iterator, bool >const key_type &M &&Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj) to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value as if by insert, constructing it from value_type(k, forward<M>(obj)).No iterators or references are invalidated. If the insertion is successful, pointers and references to the element obtained while it is held in the node handle are invalidated, and pointers and references obtained to that element before it was extracted become valid.Returns: The bool component is true if the insertion took place and false if the assignment took place. The iterator component is pointing at the element that was inserted or updated.Complexity: Logarithmic in the size of the container. std::pair< iterator, bool >key_type &&M &&Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj) to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value as if by insert, constructing it from value_type(k, move(obj)).No iterators or references are invalidated. If the insertion is successful, pointers and references to the element obtained while it is held in the node handle are invalidated, and pointers and references obtained to that element before it was extracted become valid.Returns: The bool component is true if the insertion took place and false if the assignment took place. The iterator component is pointing at the element that was inserted or updated.Complexity: Logarithmic in the size of the container. iteratorconst_iteratorconst key_type &M &&Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj) to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value as if by insert, constructing it from value_type(k, forward<M>(obj)) and the new element to the container as close as possible to the position just before hint.No iterators or references are invalidated. If the insertion is successful, pointers and references to the element obtained while it is held in the node handle are invalidated, and pointers and references obtained to that element before it was extracted become valid.Returns: The bool component is true if the insertion took place and false if the assignment took place. The iterator component is pointing at the element that was inserted or updated.Complexity: Logarithmic in the size of the container in general, but amortized constant if the new element is inserted just before hint. iteratorconst_iteratorkey_type &&M &&Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj) to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value as if by insert, constructing it from value_type(k, move(obj)) and the new element to the container as close as possible to the position just before hint.No iterators or references are invalidated. If the insertion is successful, pointers and references to the element obtained while it is held in the node handle are invalidated, and pointers and references obtained to that element before it was extracted become valid.Returns: The bool component is true if the insertion took place and false if the assignment took place. The iterator component is pointing at the element that was inserted or updated.Complexity: Logarithmic in the size of the container in general, but amortized constant if the new element is inserted just before hint. iteratorsize_typeRequires: 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_iteratorsize_typeRequires: 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_typeiteratorRequires: 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_typeconst_iteratorRequires: 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 T &const key_type &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 &const key_type &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. std::pair< iterator, bool >Args &&...Effects: 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.Returns: 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.Complexity: Logarithmic search time plus linear insertion to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. iteratorconst_iteratorArgs &&...Effects: 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.Returns: An iterator pointing to the element with key equivalent to the key of x.Complexity: Logarithmic search time (constant if x is inserted right before p) plus insertion linear to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. std::pair< iterator, bool >const key_type &Args &&...Requires: value_type shall be EmplaceConstructible into map from piecewise_construct, forward_as_tuple(k), forward_as_tuple(forward<Args>(args)...).Effects: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(k), forward_as_tuple(forward<Args>(args)...).Returns: The bool component of the returned pair is true if and only if the insertion took place. The returned iterator points to the map element whose key is equivalent to k.Complexity: Logarithmic. iteratorconst_iteratorconst key_type &Args &&...Requires: value_type shall be EmplaceConstructible into map from piecewise_construct, forward_as_tuple(k), forward_as_tuple(forward<Args>(args)...).Effects: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(k), forward_as_tuple(forward<Args>(args)...).Returns: The returned iterator points to the map element whose key is equivalent to k.Complexity: Logarithmic in general, but amortized constant if value is inserted right before p. std::pair< iterator, bool >key_type &&Args &&...Requires: value_type shall be EmplaceConstructible into map from piecewise_construct, forward_as_tuple(move(k)), forward_as_tuple(forward<Args>(args)...).Effects: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(move(k)), forward_as_tuple(forward<Args>(args)...).Returns: The bool component of the returned pair is true if and only if the insertion took place. The returned iterator points to the map element whose key is equivalent to k.Complexity: Logarithmic. iteratorconst_iteratorkey_type &&Args &&...Requires: value_type shall be EmplaceConstructible into map from piecewise_construct, forward_as_tuple(move(k)), forward_as_tuple(forward<Args>(args)...).Effects: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(move(k)), forward_as_tuple(forward<Args>(args)...).Returns: The returned iterator points to the map element whose key is equivalent to k.Complexity: Logarithmic in general, but amortized constant if value is inserted right before p. std::pair< iterator, bool >const value_type &Effects: Inserts x if and only if there is no element in the container with key equivalent to the key of x.Returns: 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.Complexity: Logarithmic search time plus linear insertion to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. std::pair< iterator, bool >value_type &&Effects: Inserts a new value_type move constructed from the pair if and only if there is no element in the container with key equivalent to the key of x.Returns: 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.Complexity: Logarithmic search time plus linear insertion to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. std::pair< iterator, bool >movable_value_type &&Effects: Inserts a new value_type move constructed from the pair if and only if there is no element in the container with key equivalent to the key of x.Returns: 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.Complexity: Logarithmic search time plus linear insertion to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. iteratorconst_iteratorconst value_type &Effects: Inserts a copy of x 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.Returns: An iterator pointing to the element with key equivalent to the key of x.Complexity: Logarithmic search time (constant if x is inserted right before p) plus insertion linear to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. iteratorconst_iteratorvalue_type &&Effects: Inserts an element 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 search time (constant if x is inserted right before p) plus insertion linear to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. iteratorconst_iteratormovable_value_type &&Effects: Inserts an element 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 search time (constant if x is inserted right before p) plus insertion linear to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. voidInputIteratorInputIteratorRequires: first, last are not iterators into *this.Effects: inserts each element from the range [first,last) if and only if there is no element with key equivalent to the key of that element.Complexity: N log(size()+N).Note: If an element is inserted it might invalidate elements. voidordered_unique_range_tInputIteratorInputIteratorRequires: first, last are not iterators into *this.Requires: [first ,last) must be ordered according to the predicate and must be unique values.Effects: inserts each element from the range [first,last) if and only if there is no element with key equivalent to the key of that element. This function is more efficient than the normal range creation for ordered ranges.Complexity: Linear.Note: If an element is inserted it might invalidate elements.Note: Non-standard extension. voidstd::initializer_list< value_type >Effects: inserts each element from the range [il.begin(), il.end()) if and only if there is no element with key equivalent to the key of that element.Complexity: N log(N).Note: If an element is inserted it might invalidate elements. voidordered_unique_range_tstd::initializer_list< value_type >Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be unique values.Effects: inserts each element from the range [il.begin(), il.end()) if and only if there is no element with key equivalent to the key of that element. This function is more efficient than the normal range creation for ordered ranges.Complexity: Linear.Note: If an element is inserted it might invalidate elements.Note: Non-standard extension. voidflat_map< Key, T, C2, AllocatorOrContainer > &Requires: this->get_allocator() == source.get_allocator().Effects: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.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(size() + N) (N has the value source.size()) voidflat_map< Key, T, C2, AllocatorOrContainer > &&Requires: this->get_allocator() == source.get_allocator().Effects: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.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(size() + N) (N has the value source.size()) voidflat_multimap< Key, T, C2, AllocatorOrContainer > &Requires: this->get_allocator() == source.get_allocator().Effects: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.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(size() + N) (N has the value source.size()) voidflat_multimap< Key, T, C2, AllocatorOrContainer > &&Requires: this->get_allocator() == source.get_allocator().Effects: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.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(size() + N) (N has the value source.size()) iteratorconst_iteratorEffects: 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: Linear to the elements with keys bigger than pNote: Invalidates elements with keys not less than the erased element. size_typeconst key_type &Effects: Erases all elements in the container with key equivalent to x.Returns: Returns the number of erased elements.Complexity: Logarithmic search time plus erasure time linear to the elements with bigger keys. iteratorconst_iteratorconst_iteratorEffects: Erases all the elements in the range [first, last).Returns: Returns last.Complexity: size()*N where N is the distance from first to last.Complexity: Logarithmic search time plus erasure time linear to the elements with bigger keys. voidflat_map &Effects: Swaps the contents of *this and x.Throws: Nothing.Complexity: Constant. voidEffects: erase(begin(),end()).Postcondition: size() == 0.Complexity: linear in size(). key_compareEffects: Returns the comparison object out of which a was constructed.Complexity: Constant. value_compareEffects: Returns an object of value_compare constructed out of the comparison object.Complexity: Constant. iteratorconst key_type &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_iteratorconst key_type &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. iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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_iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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_typeconst key_type &Returns: The number of elements with key equivalent to x.Complexity: log(size())+count(k) size_typeconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: The number of elements with key equivalent to x.Complexity: log(size())+count(k) boolconst key_type &Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.Complexity: log(size()). boolconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.Complexity: log(size()). iteratorconst key_type &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_iteratorconst key_type &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. iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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_iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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. iteratorconst key_type &Returns: An iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic. const_iteratorconst key_type &Returns: A const iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic. iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: An iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic. const_iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: A const iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic. std::pair< iterator, iterator >const key_type &Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic. std::pair< const_iterator, const_iterator >const key_type &Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic. std::pair< iterator, iterator >const K &Requires: This overload is available only if key_compare::is_transparent exists.Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic. std::pair< const_iterator, const_iterator >const K &Requires: This overload is available only if key_compare::is_transparent exists.Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic. sequence_typeEffects: Extracts the internal sequence container.Complexity: Same as the move constructor of sequence_type, usually constant.Postcondition: this->empty()Throws: If secuence_type's move constructor throws voidsequence_type &&Effects: Discards the internally hold sequence container and adopts the one passed externally using the move assignment. Erases non-unique elements.Complexity: Assuming O(1) move assignment, O(NlogN) with N = seq.size()Throws: If the comparison or the move constructor throws voidordered_unique_range_tsequence_type &&Requires: seq shall be ordered according to this->compare() and shall contain unique elements.Effects: Discards the internally hold sequence container and adopts the one passed externally using the move assignment.Complexity: Assuming O(1) move assignment, O(1)Throws: If the move assignment throws Effects: Default constructs an empty flat_map.Complexity: Constant. const allocator_type &Effects: Constructs an empty flat_map using the specified allocator.Complexity: Constant. const Compare &Effects: Constructs an empty flat_map using the specified comparison object.Complexity: Constant. const Compare &const allocator_type &Effects: Constructs an empty flat_map using the specified comparison object and allocator.Complexity: Constant. InputIteratorInputIteratorEffects: Constructs an empty flat_map and and inserts elements from the range [first ,last ).Complexity: Linear in N if the range [first ,last ) is already sorted using the predicate and otherwise N logN, where N is last - first. InputIteratorInputIteratorconst allocator_type &Effects: Constructs an empty flat_map using the specified allocator, and inserts elements from the range [first ,last ).Complexity: Linear in N if the range [first ,last ) is already sorted using the predicate and otherwise N logN, where N is last - first. InputIteratorInputIteratorconst Compare &Effects: Constructs an empty flat_map using the specified comparison object and and inserts elements from the range [first ,last ).Complexity: Linear in N if the range [first ,last ) is already sorted using the predicate and otherwise N logN, where N is last - first. InputIteratorInputIteratorconst Compare &const allocator_type &Effects: Constructs an empty flat_map 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 the predicate and otherwise N logN, where N is last - first. ordered_unique_range_tInputIteratorInputIteratorEffects: Constructs an empty flat_map 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. ordered_unique_range_tInputIteratorInputIteratorconst Compare &Effects: Constructs an empty flat_map using the specified comparison object 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. ordered_unique_range_tInputIteratorInputIteratorconst Compare &const allocator_type &Effects: Constructs an empty flat_map 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. ordered_unique_range_tInputIteratorInputIteratorconst allocator_type &Effects: Constructs an empty flat_map using the specified 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. std::initializer_list< value_type >Effects: Constructs an empty flat_map and inserts elements from the range [il.begin() ,il.end()).Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using the predicate and otherwise N logN, where N is last - first. std::initializer_list< value_type >const allocator_type &Effects: Constructs an empty flat_map using the specified allocator, and inserts elements from the range [il.begin() ,il.end()).Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using the predicate and otherwise N logN, where N is last - first. std::initializer_list< value_type >const Compare &Effects: Constructs an empty flat_map using the specified comparison object and inserts elements from the range [il.begin() ,il.end()).Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using the predicate and otherwise N logN, where N is last - first. std::initializer_list< value_type >const Compare &const allocator_type &Effects: Constructs an empty flat_map using the specified comparison object and allocator, and inserts elements from the range [il.begin() ,il.end()).Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using the predicate and otherwise N logN, where N is last - first. ordered_unique_range_tstd::initializer_list< value_type >Effects: Constructs an empty flat_map using and inserts elements from the ordered unique range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be unique values.Complexity: Linear in N.Note: Non-standard extension. ordered_unique_range_tstd::initializer_list< value_type >const Compare &Effects: Constructs an empty flat_map using the specified comparison object and inserts elements from the ordered unique range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be unique values.Complexity: Linear in N.Note: Non-standard extension. ordered_unique_range_tstd::initializer_list< value_type >const Compare &const allocator_type &Effects: Constructs an empty flat_map using the specified comparison object and allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be unique values.Complexity: Linear in N.Note: Non-standard extension. const flat_map &Effects: Copy constructs a flat_map.Complexity: Linear in x.size(). flat_map &&Effects: Move constructs a flat_map. Constructs *this using x's resources.Complexity: Constant.Postcondition: x is emptied. const flat_map &const allocator_type &Effects: Copy constructs a flat_map using the specified allocator.Complexity: Linear in x.size(). flat_map &&const allocator_type &Effects: Move constructs a flat_map using the specified allocator. Constructs *this using x's resources.Complexity: Constant if x.get_allocator() == a, linear otherwise. flat_map &const flat_map &Effects: Makes *this a copy of x.Complexity: Linear in x.size(). flat_map &flat_map &&Effects: Move constructs a flat_map. Constructs *this using x's resources.Throws: If allocator_traits_type::propagate_on_container_move_assignment is false and (allocation throws or value_type's move constructor throws)Complexity: Constant if allocator_traits_type:: propagate_on_container_move_assignment is true or this->get>allocator() == x.get_allocator(). Linear otherwise. flat_map &std::initializer_list< value_type >Effects: Assign elements from il to *this friend boolconst flat_map &const flat_map &Effects: Returns true if x and y are equalComplexity: Linear to the number of elements in the container. friend boolconst flat_map &const flat_map &Effects: Returns true if x and y are unequalComplexity: Linear to the number of elements in the container. friend boolconst flat_map &const flat_map &Effects: Returns true if x is less than yComplexity: Linear to the number of elements in the container. friend boolconst flat_map &const flat_map &Effects: Returns true if x is greater than yComplexity: Linear to the number of elements in the container. friend boolconst flat_map &const flat_map &Effects: Returns true if x is equal or less than yComplexity: Linear to the number of elements in the container. friend boolconst flat_map &const flat_map &Effects: Returns true if x is equal or greater than yComplexity: Linear to the number of elements in the container. friend voidflat_map &flat_map &Effects: x.swap(y)Complexity: Constant. A flat_multimap is a kind of associative container that supports equivalent keys (possibly containing multiple copies of the same key value) and provides for fast retrieval of values of another type T based on the keys.A flat_multimap satisfies all of the requirements of a container and of a reversible container and of an associative container. For a flat_multimap<Key,T> the key_type is Key and the value_type is std::pair<Key,T> (unlike std::multimap<Key, T> which value_type is std::pair<const Key, T>).flat_multimap is similar to std::multimap but it's implemented by as an ordered sequence container. The underlying sequence container is by default vector but it can also work user-provided vector-like SequenceContainers (like static_vector or small_vector).Using vector-like sequence containers means that inserting a new element into a flat_multimap might invalidate previous iterators and references (unless that sequence container is stable_vector or a similar container that offers stable pointers and references). Similarly, erasing an element might invalidate iterators and references pointing to elements that come after (their keys are bigger) the erased element.This container provides random-access iterators. Key T Compare std::pair< Key, T > implementation_defined sequence_type::allocator_type ::boost::container::allocator_traits< allocator_type > sequence_type::pointer sequence_type::const_pointer sequence_type::reference sequence_type::const_reference sequence_type::size_type sequence_type::difference_type implementation_defined implementation_defined sequence_type::iterator sequence_type::const_iterator sequence_type::reverse_iterator sequence_type::const_reverse_iterator implementation_defined (dtl::is_same< std::pair< Key, T >, value_type >::value) allocator_typeEffects: Returns a copy of the allocator that was passed to the object's constructor.Complexity: Constant. stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. const stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. iteratorEffects: Returns an iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant. iteratorEffects: Returns an iterator to the end of the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the container.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. boolEffects: Returns true if the container contains no elements.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the number of the elements contained in the container.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the largest possible size of the container.Throws: Nothing.Complexity: Constant. size_typeEffects: Number of elements for which memory has been allocated. capacity() is always greater than or equal to size().Throws: Nothing.Complexity: Constant. voidsize_typeEffects: If n is less than or equal to capacity(), or the underlying container has no reserve member, 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 constructor throws.Note: If capacity() is less than "cnt", iterators and references to to values might be invalidated. voidEffects: Tries to deallocate the excess of memory created Throws: If memory allocation throws, or T's copy constructor throws.Complexity: Linear to size(). iteratorsize_typeRequires: 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_iteratorsize_typeRequires: 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_typeiteratorRequires: 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_typeconst_iteratorRequires: 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 iteratorArgs &&...Effects: Inserts an object of type T constructed with std::forward<Args>(args)... and returns the iterator pointing to the newly inserted element.Complexity: Logarithmic search time plus linear insertion to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. iteratorconst_iteratorArgs &&...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 search time (constant time if the value is to be inserted before p) plus linear insertion to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. iteratorconst value_type &Effects: Inserts x and returns the iterator pointing to the newly inserted element.Complexity: Logarithmic search time plus linear insertion to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. iteratorvalue_type &&Effects: Inserts a new value move-constructed from x and returns the iterator pointing to the newly inserted element.Complexity: Logarithmic search time plus linear insertion to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. iteratorimpl_value_type &&Effects: Inserts a new value move-constructed from x and returns the iterator pointing to the newly inserted element.Complexity: Logarithmic search time plus linear insertion to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. iteratorconst_iteratorconst value_type &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 search time (constant time if the value is to be inserted before p) plus linear insertion to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. iteratorconst_iteratorvalue_type &&Effects: Inserts a 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 search time (constant time if the value is to be inserted before p) plus linear insertion to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. iteratorconst_iteratorimpl_value_type &&Effects: Inserts a 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 search time (constant time if the value is to be inserted before p) plus linear insertion to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. voidInputIteratorInputIteratorRequires: first, last are not iterators into *this.Effects: inserts each element from the range [first,last) .Complexity: N log(N).Note: If an element is inserted it might invalidate elements. voidordered_range_tInputIteratorInputIteratorRequires: first, last are not iterators into *this.Requires: [first ,last) must be ordered according to the predicate.Effects: inserts each element from the range [first,last) if and only if there is no element with key equivalent to the key of that element. This function is more efficient than the normal range creation for ordered ranges.Complexity: Linear.Note: If an element is inserted it might invalidate elements.Note: Non-standard extension. voidstd::initializer_list< value_type >Effects: inserts each element from the range [il.begin(), il.end()) .Complexity: N log(N).Note: If an element is inserted it might invalidate elements. voidordered_range_tstd::initializer_list< value_type >Requires: [il.begin(), il.end()) must be ordered according to the predicate.Effects: inserts each element from the range [il.begin(), il.end()) if and only if there is no element with key equivalent to the key of that element. This function is more efficient than the normal range creation for ordered ranges.Complexity: Linear.Note: If an element is inserted it might invalidate elements.Note: Non-standard extension. voidflat_multimap< Key, T, C2, AllocatorOrContainer > &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(size() + N) (N has the value source.size()) voidflat_multimap< Key, T, C2, AllocatorOrContainer > &&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(size() + N) (N has the value source.size()) voidflat_map< Key, T, C2, AllocatorOrContainer > &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(size() + N) (N has the value source.size()) voidflat_map< Key, T, C2, AllocatorOrContainer > &&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(size() + N) (N has the value source.size()) iteratorconst_iteratorEffects: 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: Linear to the elements with keys bigger than pNote: Invalidates elements with keys not less than the erased element. size_typeconst key_type &Effects: Erases all elements in the container with key equivalent to x.Returns: Returns the number of erased elements.Complexity: Logarithmic search time plus erasure time linear to the elements with bigger keys. iteratorconst_iteratorconst_iteratorEffects: Erases all the elements in the range [first, last).Returns: Returns last.Complexity: size()*N where N is the distance from first to last.Complexity: Logarithmic search time plus erasure time linear to the elements with bigger keys. voidflat_multimap &Effects: Swaps the contents of *this and x.Throws: Nothing.Complexity: Constant. voidEffects: erase(begin(),end()).Postcondition: size() == 0.Complexity: linear in size(). key_compareEffects: Returns the comparison object out of which a was constructed.Complexity: Constant. value_compareEffects: Returns an object of value_compare constructed out of the comparison object.Complexity: Constant. iteratorconst key_type &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_iteratorconst key_type &Returns: An const_iterator pointing to an element with the key equivalent to x, or end() if such an element is not found.Complexity: Logarithmic. iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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_iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: An const_iterator pointing to an element with the key equivalent to x, or end() if such an element is not found.Complexity: Logarithmic. size_typeconst key_type &Returns: The number of elements with key equivalent to x.Complexity: log(size())+count(k) size_typeconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: The number of elements with key equivalent to x.Complexity: log(size())+count(k) boolconst key_type &Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.Complexity: log(size()). boolconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.Complexity: log(size()). iteratorconst key_type &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_iteratorconst key_type &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 iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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_iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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 iteratorconst key_type &Returns: An iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic const_iteratorconst key_type &Returns: A const iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: An iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic const_iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: A const iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic std::pair< iterator, iterator >const key_type &Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic std::pair< const_iterator, const_iterator >const key_type &Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic std::pair< iterator, iterator >const K &Requires: This overload is available only if key_compare::is_transparent exists.Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic std::pair< const_iterator, const_iterator >const K &Requires: This overload is available only if key_compare::is_transparent exists.Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic sequence_typeEffects: Extracts the internal sequence container.Complexity: Same as the move constructor of sequence_type, usually constant.Postcondition: this->empty()Throws: If secuence_type's move constructor throws voidsequence_type &&Effects: Discards the internally hold sequence container and adopts the one passed externally using the move assignment.Complexity: Assuming O(1) move assignment, O(NlogN) with N = seq.size()Throws: If the comparison or the move constructor throws voidordered_range_tsequence_type &&Requires: seq shall be ordered according to this->compare().Effects: Discards the internally hold sequence container and adopts the one passed externally using the move assignment.Complexity: Assuming O(1) move assignment, O(1)Throws: If the move assignment throws Effects: Default constructs an empty flat_map.Complexity: Constant. const allocator_type &Effects: Constructs an empty flat_multimap using the specified allocator.Complexity: Constant. const Compare &Effects: Constructs an empty flat_multimap using the specified comparison object .Complexity: Constant. const Compare &const allocator_type &Effects: Constructs an empty flat_multimap using the specified comparison object and allocator.Complexity: Constant. InputIteratorInputIteratorEffects: Constructs an empty flat_multimap and inserts elements from the range [first ,last ).Complexity: Linear in N if the range [first ,last ) is already sorted using the predicate and otherwise N logN, where N is last - first. InputIteratorInputIteratorconst allocator_type &Effects: Constructs an empty flat_multimap using the specified allocator, and inserts elements from the range [first ,last ).Complexity: Linear in N if the range [first ,last ) is already sorted using the predicate and otherwise N logN, where N is last - first. InputIteratorInputIteratorconst Compare &Effects: Constructs an empty flat_multimap using the specified comparison object and inserts elements from the range [first ,last ).Complexity: Linear in N if the range [first ,last ) is already sorted using the predicate and otherwise N logN, where N is last - first. InputIteratorInputIteratorconst Compare &const allocator_type &Effects: Constructs an empty flat_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 the predicate and otherwise N logN, where N is last - first. ordered_range_tInputIteratorInputIteratorEffects: Constructs an empty flat_multimap 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. ordered_range_tInputIteratorInputIteratorconst Compare &Effects: Constructs an empty flat_multimap using the specified comparison object 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. ordered_range_tInputIteratorInputIteratorconst Compare &const allocator_type &Effects: Constructs an empty flat_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. ordered_range_tInputIteratorInputIteratorconst allocator_type &Effects: Constructs an empty flat_multimap using the specified comparison object 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. std::initializer_list< value_type >Effects: Constructs an empty flat_map and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using the predicate and otherwise N logN, where N is last - first. std::initializer_list< value_type >const allocator_type &Effects: Constructs an empty flat_map using the specified allocator, and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using the predicate and otherwise N logN, where N is last - first. std::initializer_list< value_type >const Compare &Effects: Constructs an empty flat_map using the specified comparison object and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using the predicate and otherwise N logN, where N is last - first. std::initializer_list< value_type >const Compare &const allocator_type &Effects: Constructs an empty flat_map using the specified comparison object and allocator, and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using the predicate and otherwise N logN, where N is last - first. ordered_range_tstd::initializer_list< value_type >Effects: Constructs an empty flat_multimap and inserts elements from the ordered range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate.Complexity: Linear in N.Note: Non-standard extension. ordered_range_tstd::initializer_list< value_type >const Compare &Effects: Constructs an empty flat_multimap using the specified comparison object and inserts elements from the ordered range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate.Complexity: Linear in N.Note: Non-standard extension. ordered_range_tstd::initializer_list< value_type >const Compare &const allocator_type &Effects: Constructs an empty flat_multimap using the specified comparison object and allocator, and inserts elements from the ordered range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate.Complexity: Linear in N.Note: Non-standard extension. const flat_multimap &Effects: Copy constructs a flat_multimap.Complexity: Linear in x.size(). flat_multimap &&Effects: Move constructs a flat_multimap. Constructs *this using x's resources.Complexity: Constant.Postcondition: x is emptied. const flat_multimap &const allocator_type &Effects: Copy constructs a flat_multimap using the specified allocator.Complexity: Linear in x.size(). flat_multimap &&const allocator_type &Effects: Move constructs a flat_multimap using the specified allocator. Constructs *this using x's resources.Complexity: Constant if a == x.get_allocator(), linear otherwise. flat_multimap &const flat_multimap &Effects: Makes *this a copy of x.Complexity: Linear in x.size(). flat_multimap &flat_multimap &&Effects: this->swap(x.get()).Complexity: Constant. flat_multimap &std::initializer_list< value_type >Effects: Assign content of il to *thisComplexity: Linear in il.size(). friend boolconst flat_multimap &const flat_multimap &Effects: Returns true if x and y are equalComplexity: Linear to the number of elements in the container. friend boolconst flat_multimap &const flat_multimap &Effects: Returns true if x and y are unequalComplexity: Linear to the number of elements in the container. friend boolconst flat_multimap &const flat_multimap &Effects: Returns true if x is less than yComplexity: Linear to the number of elements in the container. friend boolconst flat_multimap &const flat_multimap &Effects: Returns true if x is greater than yComplexity: Linear to the number of elements in the container. friend boolconst flat_multimap &const flat_multimap &Effects: Returns true if x is equal or less than yComplexity: Linear to the number of elements in the container. friend boolconst flat_multimap &const flat_multimap &Effects: Returns true if x is equal or greater than yComplexity: Linear to the number of elements in the container. friend voidflat_multimap &flat_multimap &Effects: x.swap(y)Complexity: Constant. InputIteratorInputIterator InputIteratorInputIteratorAllocatorOrCompare const & InputIteratorInputIteratorCompare const &Allocator const & ordered_unique_range_tInputIteratorInputIterator ordered_unique_range_tInputIteratorInputIteratorAllocatorOrCompare const & ordered_unique_range_tInputIteratorInputIteratorCompare const &Allocator const & InputIteratorInputIterator InputIteratorInputIteratorAllocatorOrCompare const & InputIteratorInputIteratorCompare const &Allocator const & ordered_range_tInputIteratorInputIterator ordered_range_tInputIteratorInputIteratorAllocatorOrCompare const & ordered_range_tInputIteratorInputIteratorCompare const &Allocator const &
A portable metafunction to obtain a flat_map that uses a polymorphic allocator boost::container::flat_map< Key, T, Compare, polymorphic_allocator< std::pair< Key, T > > > A portable metafunction to obtain a flat_multimap that uses a polymorphic allocator boost::container::flat_multimap< Key, T, Compare, polymorphic_allocator< std::pair< Key, T > > > boost::container::flat_map< Key, T, Compare, polymorphic_allocator< std::pair< Key, T > > > boost::container::flat_multimap< Key, T, Compare, polymorphic_allocator< std::pair< Key, T > > >
flat_multiset is a Sorted Associative Container that stores objects of type Key and can store multiple copies of the same key value.flat_multiset is similar to std::multiset but it's implemented by as an ordered sequence container. The underlying sequence container is by default vector but it can also work user-provided vector-like SequenceContainers (like static_vector or small_vector).Using vector-like sequence containers means that inserting a new element into a flat_multiset might invalidate previous iterators and references (unless that sequence container is stable_vector or a similar container that offers stable pointers and references). Similarly, erasing an element might invalidate iterators and references pointing to elements that come after (their keys are bigger) the erased element.This container provides random-access iterators. Key Compare Key implementation_defined sequence_type::allocator_type ::boost::container::allocator_traits< allocator_type > sequence_type::pointer sequence_type::const_pointer sequence_type::reference sequence_type::const_reference sequence_type::size_type sequence_type::difference_type implementation_defined implementation_defined sequence_type::iterator sequence_type::const_iterator sequence_type::reverse_iterator sequence_type::const_reverse_iterator allocator_typeEffects: Returns a copy of the allocator that was passed to the object's constructor.Complexity: Constant. stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. const stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. iteratorEffects: Returns an iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant. iteratorEffects: Returns an iterator to the end of the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the container.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. boolEffects: Returns true if the container contains no elements.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the number of the elements contained in the container.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the largest possible size of the container.Throws: Nothing.Complexity: Constant. size_typeEffects: Number of elements for which memory has been allocated. capacity() is always greater than or equal to size().Throws: Nothing.Complexity: Constant. voidsize_typeEffects: If n is less than or equal to capacity(), or the underlying container has no reserve member, 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 constructor throws.Note: If capacity() is less than "cnt", iterators and references to to values might be invalidated. voidEffects: Tries to deallocate the excess of memory created Throws: If memory allocation throws, or Key's copy constructor throws.Complexity: Linear to size(). iteratorArgs &&...Effects: Inserts an object of type Key constructed with std::forward<Args>(args)... and returns the iterator pointing to the newly inserted element.Complexity: Logarithmic search time plus linear insertion to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. iteratorconst_iteratorArgs &&...Effects: Inserts an object of type Key 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 search time (constant if x is inserted right before p) plus insertion linear to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. iteratorconst value_type &Effects: Inserts x and returns the iterator pointing to the newly inserted element.Complexity: Logarithmic search time plus linear insertion to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. iteratorvalue_type &&Effects: Inserts a new value_type move constructed from x and returns the iterator pointing to the newly inserted element.Complexity: Logarithmic search time plus linear insertion to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. iteratorconst_iteratorconst value_type &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 search time (constant if x is inserted right before p) plus insertion linear to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. iteratorconst_iteratorvalue_type &&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 search time (constant if x is inserted right before p) plus insertion linear to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. voidInputIteratorInputIteratorRequires: first, last are not iterators into *this.Effects: inserts each element from the range [first,last) .Complexity: N log(N).Note: If an element is inserted it might invalidate elements. voidordered_range_tInputIteratorInputIteratorRequires: first, last are not iterators into *this and must be ordered according to the predicate.Effects: inserts each element from the range [first,last) .This function is more efficient than the normal range creation for ordered ranges.Complexity: Linear.Note: Non-standard extension. If an element is inserted it might invalidate elements. voidstd::initializer_list< value_type >Effects: inserts each element from the range [il.begin(), il.end()).Complexity: N log(N).Note: If an element is inserted it might invalidate elements. voidordered_range_tstd::initializer_list< value_type >Requires: Range [il.begin(), il.end()) must be ordered according to the predicate.Effects: inserts each element from the range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Complexity: Linear.Note: Non-standard extension. If an element is inserted it might invalidate elements. voidflat_multiset< Key, C2, AllocatorOrContainer > &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(size() + N) (N has the value source.size()) voidflat_multiset< Key, C2, AllocatorOrContainer > &&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(size() + N) (N has the value source.size()) voidflat_set< Key, C2, AllocatorOrContainer > &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(size() + N) (N has the value source.size()) voidflat_set< Key, C2, AllocatorOrContainer > &&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(size() + N) (N has the value source.size()) iteratorconst_iteratorEffects: 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: Linear to the elements with keys bigger than pNote: Invalidates elements with keys not less than the erased element. size_typeconst key_type &Effects: Erases all elements in the container with key equivalent to x.Returns: Returns the number of erased elements.Complexity: Logarithmic search time plus erasure time linear to the elements with bigger keys. iteratorconst_iteratorconst_iteratorEffects: Erases all the elements in the range [first, last).Returns: Returns last.Complexity: size()*N where N is the distance from first to last.Complexity: Logarithmic search time plus erasure time linear to the elements with bigger keys. voidflat_multiset &Effects: Swaps the contents of *this and x.Throws: Nothing.Complexity: Constant. voidEffects: erase(begin(),end()).Postcondition: size() == 0.Complexity: linear in size(). key_compareEffects: Returns the comparison object out of which a was constructed.Complexity: Constant. value_compareEffects: Returns an object of value_compare constructed out of the comparison object.Complexity: Constant. iteratorconst key_type &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_iteratorconst key_type &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. iteratorsize_typeRequires: 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_iteratorsize_typeRequires: 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_typeiteratorRequires: 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_typeconst_iteratorRequires: 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_typeconst key_type &Returns: The number of elements with key equivalent to x.Complexity: log(size())+count(k) boolconst key_type &Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.Complexity: log(size()). boolconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.Complexity: log(size()). iteratorconst key_type &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_iteratorconst key_type &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 iteratorconst key_type &Returns: An iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic const_iteratorconst key_type &Returns: A const iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic std::pair< const_iterator, const_iterator >const key_type &Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic std::pair< iterator, iterator >const key_type &Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic sequence_typeEffects: Extracts the internal sequence container.Complexity: Same as the move constructor of sequence_type, usually constant.Postcondition: this->empty()Throws: If secuence_type's move constructor throws voidsequence_type &&Effects: Discards the internally hold sequence container and adopts the one passed externally using the move assignment.Complexity: Assuming O(1) move assignment, O(NlogN) with N = seq.size()Throws: If the comparison or the move constructor throws voidordered_range_tsequence_type &&Requires: seq shall be ordered according to this->compare()Effects: Discards the internally hold sequence container and adopts the one passed externally using the move assignment.Complexity: Assuming O(1) move assignment, O(1)Throws: If the move assignment throws Effects: Default constructs an empty container.Complexity: Constant. const Compare &Effects: Constructs an empty container using the specified comparison object.Complexity: Constant. const allocator_type &Effects: Constructs an empty container using the specified allocator.Complexity: Constant. const Compare &const allocator_type &Effects: Constructs an empty container using the specified comparison object and allocator.Complexity: Constant. InputIteratorInputIteratorEffects: Constructs an empty container 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. InputIteratorInputIteratorconst allocator_type &Effects: Constructs an empty container using the specified 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. InputIteratorInputIteratorconst Compare &Effects: Constructs an empty container using the specified comparison object 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. InputIteratorInputIteratorconst Compare &const allocator_type &Effects: Constructs an empty container 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. ordered_range_tInputIteratorInputIteratorEffects: Constructs an empty flat_multiset 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. ordered_range_tInputIteratorInputIteratorconst Compare &Effects: Constructs an empty flat_multiset using the specified comparison object 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. ordered_range_tInputIteratorInputIteratorconst Compare &const allocator_type &Effects: Constructs an empty flat_multiset 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. ordered_range_tInputIteratorInputIteratorconst allocator_type &Effects: Constructs an empty flat_multiset using the specified 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. std::initializer_list< value_type >Effects: Default constructs an empty container.Complexity: Constant. std::initializer_list< value_type >const allocator_type &Effects: Constructs an empty container using the specified allocator, and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using comp and otherwise N logN, where N is il.begin() - il.end(). std::initializer_list< value_type >const Compare &Effects: Constructs an empty container using the specified comparison object and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using comp and otherwise N logN, where N is il.begin() - il.end(). std::initializer_list< value_type >const Compare &const allocator_type &Effects: Constructs an empty container using the specified comparison object and allocator, and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using comp and otherwise N logN, where N is il.begin() - il.end(). ordered_range_tstd::initializer_list< value_type >Effects: Constructs an empty containerand inserts elements from the ordered unique range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate.Complexity: Linear in N.Note: Non-standard extension. ordered_range_tstd::initializer_list< value_type >const Compare &Effects: Constructs an empty container using the specified comparison object and inserts elements from the ordered unique range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate.Complexity: Linear in N.Note: Non-standard extension. ordered_range_tstd::initializer_list< value_type >const Compare &const allocator_type &Effects: Constructs an empty container using the specified comparison object and allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate.Complexity: Linear in N.Note: Non-standard extension. const flat_multiset &Effects: Copy constructs the container.Complexity: Linear in x.size(). flat_multiset &&Effects: Move constructs thecontainer. Constructs *this using x's resources.Complexity: Constant.Postcondition: x is emptied. const flat_multiset &const allocator_type &Effects: Copy constructs a container using the specified allocator.Complexity: Linear in x.size(). flat_multiset &&const allocator_type &Effects: Move constructs a container using the specified allocator. Constructs *this using x's resources.Complexity: Constant if a == x.get_allocator(), linear otherwise flat_multiset &const flat_multiset &Effects: Makes *this a copy of x.Complexity: Linear in x.size(). flat_multiset &flat_multiset &&Throws: If allocator_traits_type::propagate_on_container_move_assignment is false and (allocation throws or value_type's move constructor throws)Complexity: Constant if allocator_traits_type:: propagate_on_container_move_assignment is true or this->get>allocator() == x.get_allocator(). Linear otherwise. flat_multiset &std::initializer_list< value_type >Effects: Copy all elements from il to *this.Complexity: Linear in il.size(). friend boolconst flat_multiset &const flat_multiset &Effects: Returns true if x and y are equalComplexity: Linear to the number of elements in the container. friend boolconst flat_multiset &const flat_multiset &Effects: Returns true if x and y are unequalComplexity: Linear to the number of elements in the container. friend boolconst flat_multiset &const flat_multiset &Effects: Returns true if x is less than yComplexity: Linear to the number of elements in the container. friend boolconst flat_multiset &const flat_multiset &Effects: Returns true if x is greater than yComplexity: Linear to the number of elements in the container. friend boolconst flat_multiset &const flat_multiset &Effects: Returns true if x is equal or less than yComplexity: Linear to the number of elements in the container. friend boolconst flat_multiset &const flat_multiset &Effects: Returns true if x is equal or greater than yComplexity: Linear to the number of elements in the container. friend voidflat_multiset &flat_multiset &Effects: x.swap(y)Complexity: Constant. flat_set is a Sorted Associative Container that stores objects of type Key. It is also a Unique Associative Container, meaning that no two elements are the same.flat_set is similar to std::set but it's implemented by as an ordered sequence container. The underlying sequence container is by default vector but it can also work user-provided vector-like SequenceContainers (like static_vector or small_vector).Using vector-like sequence containers means that inserting a new element into a flat_set might invalidate previous iterators and references (unless that sequence container is stable_vector or a similar container that offers stable pointers and references). Similarly, erasing an element might invalidate iterators and references pointing to elements that come after (their keys are bigger) the erased element.This container provides random-access iterators. Key Compare Key implementation_defined sequence_type::allocator_type ::boost::container::allocator_traits< allocator_type > sequence_type::pointer sequence_type::const_pointer sequence_type::reference sequence_type::const_reference sequence_type::size_type sequence_type::difference_type implementation_defined implementation_defined sequence_type::iterator sequence_type::const_iterator sequence_type::reverse_iterator sequence_type::const_reverse_iterator allocator_typeEffects: Returns a copy of the allocator that was passed to the object's constructor.Complexity: Constant. stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. const stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. iteratorEffects: Returns an iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant. iteratorEffects: Returns an iterator to the end of the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the container.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. boolEffects: Returns true if the container contains no elements.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the number of the elements contained in the container.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the largest possible size of the container.Throws: Nothing.Complexity: Constant. size_typeEffects: Number of elements for which memory has been allocated. capacity() is always greater than or equal to size().Throws: Nothing.Complexity: Constant. voidsize_typeEffects: If n is less than or equal to capacity(), or the underlying container has no reserve member, 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 constructor throws.Note: If capacity() is less than "cnt", iterators and references to to values might be invalidated. voidEffects: Tries to deallocate the excess of memory created Throws: If memory allocation throws, or Key's copy constructor throws.Complexity: Linear to size(). std::pair< iterator, bool >Args &&...Effects: Inserts an object x of type Key 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.Returns: 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.Complexity: Logarithmic search time plus linear insertion to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. iteratorconst_iteratorArgs &&...Effects: Inserts an object of type Key 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.Returns: An iterator pointing to the element with key equivalent to the key of x.Complexity: Logarithmic search time (constant if x is inserted right before p) plus insertion linear to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. std::pair< iterator, bool >const value_type &Effects: Inserts x if and only if there is no element in the container with key equivalent to the key of x.Returns: 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.Complexity: Logarithmic search time plus linear insertion to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. std::pair< iterator, bool >value_type &&Effects: Inserts a new value_type move constructed from the pair if and only if there is no element in the container with key equivalent to the key of x.Returns: 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.Complexity: Logarithmic search time plus linear insertion to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. iteratorconst_iteratorconst value_type &Effects: Inserts a copy of x 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.Returns: An iterator pointing to the element with key equivalent to the key of x.Complexity: Logarithmic search time (constant if x is inserted right before p) plus insertion linear to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. iteratorconst_iteratorvalue_type &&Effects: Inserts an element 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 search time (constant if x is inserted right before p) plus insertion linear to the elements with bigger keys than x.Note: If an element is inserted it might invalidate elements. voidInputIteratorInputIteratorRequires: first, last are not iterators into *this.Effects: inserts each element from the range [first,last) if and only if there is no element with key equivalent to the key of that element.Complexity: N log(N).Note: If an element is inserted it might invalidate elements. voidordered_unique_range_tInputIteratorInputIteratorRequires: first, last are not iterators into *this and must be ordered according to the predicate and must be unique values.Effects: inserts each element from the range [first,last) .This function is more efficient than the normal range creation for ordered ranges.Complexity: Linear.Note: Non-standard extension. If an element is inserted it might invalidate elements. voidstd::initializer_list< value_type >Effects: inserts each element from the range [il.begin(), il.end()) if and only if there is no element with key equivalent to the key of that element.Complexity: N log(N).Note: If an element is inserted it might invalidate elements. voidordered_unique_range_tstd::initializer_list< value_type >Requires: Range [il.begin(), il.end()) must be ordered according to the predicate and must be unique values.Effects: inserts each element from the range [il.begin(), il.end()) .This function is more efficient than the normal range creation for ordered ranges.Complexity: Linear.Note: Non-standard extension. If an element is inserted it might invalidate elements. voidflat_set< Key, C2, AllocatorOrContainer > &Requires: this->get_allocator() == source.get_allocator().Effects: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.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(size() + N) (N has the value source.size()) voidflat_set< Key, C2, AllocatorOrContainer > &&Requires: this->get_allocator() == source.get_allocator().Effects: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.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(size() + N) (N has the value source.size()) voidflat_multiset< Key, C2, AllocatorOrContainer > &Requires: this->get_allocator() == source.get_allocator().Effects: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.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(size() + N) (N has the value source.size()) voidflat_multiset< Key, C2, AllocatorOrContainer > &&Requires: this->get_allocator() == source.get_allocator().Effects: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.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(size() + N) (N has the value source.size()) iteratorconst_iteratorEffects: 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: Linear to the elements with keys bigger than pNote: Invalidates elements with keys not less than the erased element. size_typeconst key_type &Effects: Erases all elements in the container with key equivalent to x.Returns: Returns the number of erased elements.Complexity: Logarithmic search time plus erasure time linear to the elements with bigger keys. iteratorconst_iteratorconst_iteratorEffects: Erases all the elements in the range [first, last).Returns: Returns last.Complexity: size()*N where N is the distance from first to last.Complexity: Logarithmic search time plus erasure time linear to the elements with bigger keys. voidflat_set &Effects: Swaps the contents of *this and x.Throws: Nothing.Complexity: Constant. voidEffects: erase(begin(),end()).Postcondition: size() == 0.Complexity: linear in size(). key_compareEffects: Returns the comparison object out of which a was constructed.Complexity: Constant. value_compareEffects: Returns an object of value_compare constructed out of the comparison object.Complexity: Constant. iteratorconst key_type &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_iteratorconst key_type &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. iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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_iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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. iteratorsize_typeRequires: 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_iteratorsize_typeRequires: 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_typeiteratorRequires: 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_typeconst_iteratorRequires: 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_typeconst key_type &Returns: The number of elements with key equivalent to x.Complexity: log(size())+count(k) size_typeconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: The number of elements with key equivalent to x.Complexity: log(size())+count(k) boolconst key_type &Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.Complexity: log(size()). boolconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.Complexity: log(size()). iteratorconst key_type &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_iteratorconst key_type &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 iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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_iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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 iteratorconst key_type &Returns: An iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic const_iteratorconst key_type &Returns: A const iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: An iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic const_iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: A const iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic std::pair< const_iterator, const_iterator >const key_type &Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic std::pair< iterator, iterator >const key_type &Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic std::pair< iterator, iterator >const K &Requires: This overload is available only if key_compare::is_transparent exists.Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic std::pair< const_iterator, const_iterator >const K &Requires: This overload is available only if key_compare::is_transparent exists.Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic sequence_typeEffects: Extracts the internal sequence container.Complexity: Same as the move constructor of sequence_type, usually constant.Postcondition: this->empty()Throws: If secuence_type's move constructor throws voidsequence_type &&Effects: Discards the internally hold sequence container and adopts the one passed externally using the move assignment. Erases non-unique elements.Complexity: Assuming O(1) move assignment, O(NlogN) with N = seq.size()Throws: If the comparison or the move constructor throws voidordered_unique_range_tsequence_type &&Requires: seq shall be ordered according to this->compare() and shall contain unique elements.Effects: Discards the internally hold sequence container and adopts the one passed externally using the move assignment.Complexity: Assuming O(1) move assignment, O(1)Throws: If the move assignment throws Effects: Default constructs an empty container.Complexity: Constant. const Compare &Effects: Constructs an empty container using the specified comparison object.Complexity: Constant. const allocator_type &Effects: Constructs an empty container using the specified allocator.Complexity: Constant. const Compare &const allocator_type &Effects: Constructs an empty container using the specified comparison object and allocator.Complexity: Constant. InputIteratorInputIteratorEffects: Constructs an empty container 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. InputIteratorInputIteratorconst allocator_type &Effects: Constructs an empty container using the specified 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. InputIteratorInputIteratorconst Compare &Effects: Constructs an empty container using the specified comparison object 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. InputIteratorInputIteratorconst Compare &const allocator_type &Effects: Constructs an empty container 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. ordered_unique_range_tInputIteratorInputIteratorEffects: Constructs an empty container and inserts elements from the ordered unique 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 and must be unique values.Complexity: Linear in N.Note: Non-standard extension. ordered_unique_range_tInputIteratorInputIteratorconst Compare &Effects: Constructs an empty container using the specified comparison object and inserts elements from the ordered unique 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 and must be unique values.Complexity: Linear in N.Note: Non-standard extension. ordered_unique_range_tInputIteratorInputIteratorconst Compare &const allocator_type &Effects: Constructs an empty container using the specified comparison object and allocator, and inserts elements from the ordered unique 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 and must be unique values.Complexity: Linear in N.Note: Non-standard extension. ordered_unique_range_tInputIteratorInputIteratorconst allocator_type &Effects: Constructs an empty container using the specified allocator and inserts elements from the ordered unique 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 and must be unique values.Complexity: Linear in N.Note: Non-standard extension. std::initializer_list< value_type >Effects: Constructs an empty container and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using comp and otherwise N logN, where N is il.begin() - il.end(). std::initializer_list< value_type >const allocator_type &Effects: Constructs an empty container using the specified allocator, and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using comp and otherwise N logN, where N is il.begin() - il.end(). std::initializer_list< value_type >const Compare &Effects: Constructs an empty container using the specified comparison object and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using comp and otherwise N logN, where N is il.begin() - il.end(). std::initializer_list< value_type >const Compare &const allocator_type &Effects: Constructs an empty container using the specified comparison object and allocator, and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using comp and otherwise N logN, where N is il.begin() - il.end(). ordered_unique_range_tstd::initializer_list< value_type >Effects: Constructs an empty container using the specified comparison object and inserts elements from the ordered unique range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be unique values.Complexity: Linear in N.Note: Non-standard extension. ordered_unique_range_tstd::initializer_list< value_type >const Compare &Effects: Constructs an empty container using the specified comparison object and inserts elements from the ordered unique range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be unique values.Complexity: Linear in N.Note: Non-standard extension. ordered_unique_range_tstd::initializer_list< value_type >const Compare &const allocator_type &Effects: Constructs an empty container using the specified comparison object and allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be unique values.Complexity: Linear in N.Note: Non-standard extension. const flat_set &Effects: Copy constructs the container.Complexity: Linear in x.size(). flat_set &&Effects: Move constructs thecontainer. Constructs *this using x's resources.Complexity: Constant.Postcondition: x is emptied. const flat_set &const allocator_type &Effects: Copy constructs a container using the specified allocator.Complexity: Linear in x.size(). flat_set &&const allocator_type &Effects: Move constructs a container using the specified allocator. Constructs *this using x's resources.Complexity: Constant if a == x.get_allocator(), linear otherwise flat_set &const flat_set &Effects: Makes *this a copy of x.Complexity: Linear in x.size(). flat_set &flat_set &&Throws: If allocator_traits_type::propagate_on_container_move_assignment is false and (allocation throws or value_type's move constructor throws)Complexity: Constant if allocator_traits_type:: propagate_on_container_move_assignment is true or this->get>allocator() == x.get_allocator(). Linear otherwise. flat_set &std::initializer_list< value_type >Effects: Copy all elements from il to *this.Complexity: Linear in il.size(). friend boolconst flat_set &const flat_set &Effects: Returns true if x and y are equalComplexity: Linear to the number of elements in the container. friend boolconst flat_set &const flat_set &Effects: Returns true if x and y are unequalComplexity: Linear to the number of elements in the container. friend boolconst flat_set &const flat_set &Effects: Returns true if x is less than yComplexity: Linear to the number of elements in the container. friend boolconst flat_set &const flat_set &Effects: Returns true if x is greater than yComplexity: Linear to the number of elements in the container. friend boolconst flat_set &const flat_set &Effects: Returns true if x is equal or less than yComplexity: Linear to the number of elements in the container. friend boolconst flat_set &const flat_set &Effects: Returns true if x is equal or greater than yComplexity: Linear to the number of elements in the container. friend voidflat_set &flat_set &Effects: x.swap(y)Complexity: Constant. InputIteratorInputIterator InputIteratorInputIteratorAllocatorOrCompare const & InputIteratorInputIteratorCompare const &Allocator const & ordered_unique_range_tInputIteratorInputIterator ordered_unique_range_tInputIteratorInputIteratorAllocatorOrCompare const & ordered_unique_range_tInputIteratorInputIteratorCompare const &Allocator const & InputIteratorInputIterator InputIteratorInputIteratorAllocatorOrCompare const & InputIteratorInputIteratorCompare const &Allocator const & ordered_range_tInputIteratorInputIterator ordered_range_tInputIteratorInputIteratorAllocatorOrCompare const & ordered_range_tInputIteratorInputIteratorCompare const &Allocator const &
A portable metafunction to obtain a flat_multiset that uses a polymorphic allocator boost::container::flat_multiset< Key, Compare, polymorphic_allocator< Key > > A portable metafunction to obtain a flat_set that uses a polymorphic allocator boost::container::flat_set< Key, Compare, polymorphic_allocator< Key > > boost::container::flat_set< Key, Compare, polymorphic_allocator< Key > > boost::container::flat_multiset< Key, Compare, polymorphic_allocator< Key > >
dtl::node_alloc_holder< real_allocator< T, Allocator >::type, dtl::intrusive_list_type< real_allocator< T, Allocator >::type >::type >A list is a doubly linked list. That is, it is a Sequence that supports both forward and backward traversal, and (amortized) constant time insertion and removal of elements at the beginning or the end, or in the middle. Lists have the important property that insertion and splicing do not invalidate iterators to list elements, and that even removal invalidates only the iterators that point to the elements that are removed. The ordering of iterators may be changed (that is, list<T>::iterator might have a different predecessor or successor after a list operation than it did before), but the iterators themselves will not be invalidated or made to point to different elements unless that invalidation or mutation is explicit. T ::boost::container::allocator_traits< ValueAllocator >::pointer ::boost::container::allocator_traits< ValueAllocator >::const_pointer ::boost::container::allocator_traits< ValueAllocator >::reference ::boost::container::allocator_traits< ValueAllocator >::const_reference ::boost::container::allocator_traits< ValueAllocator >::size_type ::boost::container::allocator_traits< ValueAllocator >::difference_type ValueAllocator implementation_defined implementation_defined implementation_defined implementation_defined implementation_defined voidsize_typeconst T &Effects: Assigns the n copies of val to *this.Throws: If memory allocation throws or T's copy constructor throws.Complexity: Linear to n. voidInpItInpItEffects: Assigns the range [first, last) to *this.Throws: If memory allocation throws or T's constructor from dereferencing InpIt throws.Complexity: Linear to n. voidstd::initializer_list< value_type >Effects: Assigns the range [il.begin(), il.end()) to *this.Throws: If memory allocation throws or T's constructor from dereferencing std::initializer_list iterator throws.Complexity: Linear to n. allocator_typeEffects: Returns a copy of the internal allocator.Throws: If allocator's copy constructor throws.Complexity: Constant. stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. const stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. iteratorEffects: Returns an iterator to the first element contained in the list.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the list.Throws: Nothing.Complexity: Constant. iteratorEffects: Returns an iterator to the end of the list.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the list.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the beginning of the reversed list.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed list.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the end of the reversed list.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed list.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the list.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the list.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed list.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed list.Throws: Nothing.Complexity: Constant. boolEffects: Returns true if the list contains no elements.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the number of the elements contained in the list.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the largest possible size of the list.Throws: Nothing.Complexity: Constant. voidsize_typeEffects: 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 constructor throws.Complexity: Linear to the difference between size() and new_size. voidsize_typeconst T &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 constructor throws.Complexity: Linear to the difference between size() and new_size. referenceRequires: !empty()Effects: Returns a reference to the first element from the beginning of the container.Throws: Nothing.Complexity: Constant. const_referenceRequires: !empty()Effects: Returns a const reference to the first element from the beginning of the container.Throws: Nothing.Complexity: Constant. referenceRequires: !empty()Effects: Returns a reference to the first element from the beginning of the container.Throws: Nothing.Complexity: Constant. const_referenceRequires: !empty()Effects: Returns a const reference to the first element from the beginning of the container.Throws: Nothing.Complexity: Constant. referenceArgs &&...Effects: Inserts an object of type T constructed with std::forward<Args>(args)... in the end of the list.Returns: A reference to the created object.Throws: If memory allocation throws or T's in-place constructor throws.Complexity: Constant referenceArgs &&...Effects: Inserts an object of type T constructed with std::forward<Args>(args)... in the beginning of the list.Returns: A reference to the created object.Throws: If memory allocation throws or T's in-place constructor throws.Complexity: Constant iteratorconst_iteratorArgs &&...Effects: Inserts an object of type T constructed with std::forward<Args>(args)... before p.Throws: If memory allocation throws or T's in-place constructor throws.Complexity: Constant voidconst T &Effects: Inserts a copy of x at the beginning of the list.Throws: If memory allocation throws or T's copy constructor throws.Complexity: Amortized constant time. voidT &&Effects: Constructs a new element in the beginning of the list and moves the resources of x to this new element.Throws: If memory allocation throws.Complexity: Amortized constant time. voidconst T &Effects: Inserts a copy of x at the end of the list.Throws: If memory allocation throws or T's copy constructor throws.Complexity: Amortized constant time. voidT &&Effects: Constructs a new element in the end of the list and moves the resources of x to this new element.Throws: If memory allocation throws.Complexity: Amortized constant time. iteratorconst_iteratorconst T &Requires: p must be a valid iterator of *this.Effects: Insert a copy of x before p.Returns: an iterator to the inserted element.Throws: If memory allocation throws or x's copy constructor throws.Complexity: Amortized constant time. iteratorconst_iteratorT &&Requires: p must be a valid iterator of *this.Effects: Insert a new element before p with x's resources.Returns: an iterator to the inserted element.Throws: If memory allocation throws.Complexity: Amortized constant time. iteratorconst_iteratorsize_typeconst T &Requires: p must be a valid iterator of *this.Effects: Inserts n copies of x before p.Returns: an iterator to the first inserted element or p if n is 0.Throws: If memory allocation throws or T's copy constructor throws.Complexity: Linear to n. iteratorconst_iteratorInpItInpItRequires: p must be a valid iterator of *this.Effects: Insert a copy of the [first, last) range before p.Returns: an iterator to the first inserted element or p if first == last.Throws: If memory allocation throws, T's constructor from a dereferenced InpIt throws.Complexity: Linear to distance [first, last). iteratorconst_iteratorstd::initializer_list< value_type >Requires: p must be a valid iterator of *this.Effects: Insert a copy of the [il.begin(), il.end()) range before p.Returns: an iterator to the first inserted element or p if if.begin() == il.end().Throws: If memory allocation throws, T's constructor from a dereferenced std::initializer_list iterator throws.Complexity: Linear to distance [il.begin(), il.end()). voidEffects: Removes the first element from the list.Throws: Nothing.Complexity: Amortized constant time. voidEffects: Removes the last element from the list.Throws: Nothing.Complexity: Amortized constant time. iteratorconst_iteratorRequires: p must be a valid iterator of *this.Effects: Erases the element at p.Throws: Nothing.Complexity: Amortized constant time. iteratorconst_iteratorconst_iteratorRequires: first and last must be valid iterator to elements in *this.Effects: Erases the elements pointed by [first, last).Throws: Nothing.Complexity: Linear to the distance between first and last. voidlist &Effects: Swaps the contents of *this and x.Throws: Nothing.Complexity: Constant. voidEffects: Erases all the elements of the list.Throws: Nothing.Complexity: Linear to the number of elements in the list. voidconst_iteratorlist &Requires: p must point to an element contained by the list. x != *this. this' allocator and x's allocator shall compare equalEffects: Transfers all the elements of list x to this list, before the the element pointed by p. No destructors or copy constructors are called.Throws: NothingComplexity: Constant.Note: 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. voidconst_iteratorlist &&Requires: p must point to an element contained by the list. x != *this. this' allocator and x's allocator shall compare equalEffects: Transfers all the elements of list x to this list, before the the element pointed by p. No destructors or copy constructors are called.Throws: NothingComplexity: Constant.Note: 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. voidconst_iteratorlist &const_iteratorRequires: p must point to an element contained by this list. i must point to an element contained in list x. this' allocator and x's allocator shall compare equalEffects: Transfers the value pointed by i, from list x to this list, before the element pointed by p. No destructors or copy constructors are called. If p == i or p == ++i, this function is a null operation.Throws: NothingComplexity: Constant.Note: 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. voidconst_iteratorlist &&const_iteratorRequires: p must point to an element contained by this list. i must point to an element contained in list x. this' allocator and x's allocator shall compare equal.Effects: Transfers the value pointed by i, from list x to this list, before the element pointed by p. No destructors or copy constructors are called. If p == i or p == ++i, this function is a null operation.Throws: NothingComplexity: Constant.Note: 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. voidconst_iteratorlist &const_iteratorconst_iteratorRequires: p must point to an element contained by this list. first and last must point to elements contained in list x. this' allocator and x's allocator shall compare equalEffects: Transfers the range pointed by first and last from list x to this list, before the element pointed by p. No destructors or copy constructors are called.Throws: NothingComplexity: Linear to the number of elements transferred.Note: 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. voidconst_iteratorlist &&const_iteratorconst_iteratorRequires: p must point to an element contained by this list. first and last must point to elements contained in list x. this' allocator and x's allocator shall compare equal.Effects: Transfers the range pointed by first and last from list x to this list, before the element pointed by p. No destructors or copy constructors are called.Throws: NothingComplexity: Linear to the number of elements transferred.Note: 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. voidconst_iteratorlist &const_iteratorconst_iteratorsize_typeRequires: p must point to an element contained by this list. first and last must point to elements contained in list x. n == distance(first, last). this' allocator and x's allocator shall compare equalEffects: Transfers the range pointed by first and last from list x to this list, before the element pointed by p. No destructors or copy constructors are called.Throws: NothingComplexity: Constant.Note: 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.Note: Non-standard extension voidconst_iteratorlist &&const_iteratorconst_iteratorsize_typeRequires: p must point to an element contained by this list. first and last must point to elements contained in list x. n == distance(first, last). this' allocator and x's allocator shall compare equalEffects: Transfers the range pointed by first and last from list x to this list, before the element pointed by p. No destructors or copy constructors are called.Throws: NothingComplexity: Constant.Note: 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.Note: Non-standard extension voidconst T &Effects: Removes all the elements that compare equal to value.Throws: If comparison throws.Complexity: Linear time. It performs exactly size() comparisons for equality.Note: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. voidPredEffects: Removes all the elements for which a specified predicate is satisfied.Throws: If pred throws.Complexity: Linear time. It performs exactly size() calls to the predicate.Note: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. voidEffects: Removes adjacent duplicate elements or adjacent elements that are equal from the list.Throws: If comparison throws.Complexity: Linear time (size()-1 comparisons equality comparisons).Note: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. voidBinaryPredicateEffects: Removes adjacent duplicate elements or adjacent elements that satisfy some binary predicate from the list.Throws: If pred throws.Complexity: Linear time (size()-1 comparisons calls to pred()).Note: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. voidlist &Requires: The lists x and *this must be distinct.Effects: This function removes all of x's elements and inserts them in order into *this according to std::less<value_type>. The merge is stable; that is, if an element from *this is equivalent to one from x, then the element from *this will precede the one from x.Throws: If comparison throws.Complexity: This function is linear time: it performs at most size() + x.size() - 1 comparisons. voidlist &&Requires: The lists x and *this must be distinct.Effects: This function removes all of x's elements and inserts them in order into *this according to std::less<value_type>. The merge is stable; that is, if an element from *this is equivalent to one from x, then the element from *this will precede the one from x.Throws: If comparison throws.Complexity: This function is linear time: it performs at most size() + x.size() - 1 comparisons. voidlist &const StrictWeakOrdering &Requires: p must be a comparison function that induces a strict weak ordering and both *this and x must be sorted according to that ordering The lists x and *this must be distinct.Effects: This function removes all of x's elements and inserts them in order into *this. The merge is stable; that is, if an element from *this is equivalent to one from x, then the element from *this will precede the one from x.Throws: If comp throws.Complexity: This function is linear time: it performs at most size() + x.size() - 1 comparisons.Note: Iterators and references to *this are not invalidated. voidlist &&StrictWeakOrderingRequires: p must be a comparison function that induces a strict weak ordering and both *this and x must be sorted according to that ordering The lists x and *this must be distinct.Effects: This function removes all of x's elements and inserts them in order into *this. The merge is stable; that is, if an element from *this is equivalent to one from x, then the element from *this will precede the one from x.Throws: If comp throws.Complexity: This function is linear time: it performs at most size() + x.size() - 1 comparisons.Note: Iterators and references to *this are not invalidated. voidEffects: This function sorts the list *this according to std::less<value_type>. The sort is stable, that is, the relative order of equivalent elements is preserved.Throws: If comparison throws.Notes: Iterators and references are not invalidated.Complexity: The number of comparisons is approximately N log N, where N is the list's size. voidStrictWeakOrderingEffects: This function sorts the list *this according to std::less<value_type>. The sort is stable, that is, the relative order of equivalent elements is preserved.Throws: If comp throws.Notes: Iterators and references are not invalidated.Complexity: The number of comparisons is approximately N log N, where N is the list's size. voidEffects: Reverses the order of elements in the list.Throws: Nothing.Complexity: This function is linear time.Note: Iterators and references are not invalidated Effects: Default constructs a list.Throws: If allocator_type's default constructor throws.Complexity: Constant. const allocator_type &Effects: Constructs a list taking the allocator as parameter.Throws: NothingComplexity: Constant. size_typeEffects: Constructs a list and inserts n value-initialized value_types.Throws: If allocator_type's default constructor throws or T's default or copy constructor throws.Complexity: Linear to n. size_typeconst allocator_type &Effects: Constructs a list that will use a copy of allocator a and inserts n copies of value.Throws: If allocator_type's default constructor throws or T's default or copy constructor throws.Complexity: Linear to n. size_typeconst T &const ValueAllocator &ValueAllocator()Effects: Constructs a list that will use a copy of allocator a and inserts n copies of value.Throws: If allocator_type's default constructor throws or T's default or copy constructor throws.Complexity: Linear to n. const list &Effects: Copy constructs a list.Postcondition: x == *this.Throws: If allocator_type's default constructor throws.Complexity: Linear to the elements x contains. list &&Effects: Move constructor. Moves x's resources to *this.Throws: If allocator_type's copy constructor throws.Complexity: Constant. const list &const allocator_type &Effects: Copy constructs a list using the specified allocator.Postcondition: x == *this.Throws: If allocator_type's default constructor or copy constructor throws.Complexity: Linear to the elements x contains. list &&const allocator_type &Effects: Move constructor sing the specified allocator. Moves x's resources to *this.Throws: If allocation or value_type's copy constructor throws.Complexity: Constant if a == x.get_allocator(), linear otherwise. InpItInpItconst ValueAllocator &ValueAllocator()Effects: Constructs a list that will use a copy of allocator a and inserts a copy of the range [first, last) in the list.Throws: If allocator_type's default constructor throws or T's constructor taking a dereferenced InIt throws.Complexity: Linear to the range [first, last). std::initializer_list< value_type >const ValueAllocator &ValueAllocator()Effects: Constructs a list that will use a copy of allocator a and inserts a copy of the range [il.begin(), il.end()) in the list.Throws: If allocator_type's default constructor throws or T's constructor taking a dereferenced std::initializer_list iterator throws.Complexity: Linear to the range [il.begin(), il.end()). Effects: Destroys the list. All stored values are destroyed and used memory is deallocated.Throws: Nothing.Complexity: Linear to the number of elements. list &const list &Effects: Makes *this contain the same elements as x.Postcondition: this->size() == x.size(). *this contains a copy of each of x's elements.Throws: If memory allocation throws or T's copy constructor throws.Complexity: Linear to the number of elements in x. list &list &&Effects: Move assignment. All x's values are transferred to *this.Postcondition: x.empty(). *this contains a the elements x had before the function.Throws: If allocator_traits_type::propagate_on_container_move_assignment is false and (allocation throws or value_type's move constructor throws)Complexity: Constant if allocator_traits_type:: propagate_on_container_move_assignment is true or this->get>allocator() == x.get_allocator(). Linear otherwise. list &std::initializer_list< value_type >Effects: Makes *this contain the same elements as il.Postcondition: this->size() == il.size(). *this contains a copy of each of x's elements.Throws: If memory allocation throws or T's copy constructor throws.Complexity: Linear to the number of elements in x. friend boolconst list &const list &Effects: Returns true if x and y are equalComplexity: Linear to the number of elements in the container. friend boolconst list &const list &Effects: Returns true if x and y are unequalComplexity: Linear to the number of elements in the container. friend boolconst list &const list &Effects: Returns true if x is less than yComplexity: Linear to the number of elements in the container. friend boolconst list &const list &Effects: Returns true if x is greater than yComplexity: Linear to the number of elements in the container. friend boolconst list &const list &Effects: Returns true if x is equal or less than yComplexity: Linear to the number of elements in the container. friend boolconst list &const list &Effects: Returns true if x is equal or greater than yComplexity: Linear to the number of elements in the container. friend voidlist &list &Effects: x.swap(y)Complexity: Constant. InputIteratorInputIterator InputIteratorInputIteratorValueAllocator const &
A portable metafunction to obtain a list that uses a polymorphic allocator boost::container::list< T, polymorphic_allocator< T > > boost::container::list< T, polymorphic_allocator< T > >
A map is a kind of associative container that supports unique keys (contains at most one of each key value) and provides for fast retrieval of values of another type T based on the keys. The map class supports bidirectional iterators.A map satisfies all of the requirements of a container and of a reversible container and of an associative container. The value_type stored by this container is the value_type is std::pair<const Key, T>. Key T base_t::allocator_type ::boost::container::allocator_traits< allocator_type > boost::container::allocator_traits< allocator_type >::value_type boost::container::allocator_traits< allocator_type >::pointer boost::container::allocator_traits< allocator_type >::const_pointer boost::container::allocator_traits< allocator_type >::reference boost::container::allocator_traits< allocator_type >::const_reference boost::container::allocator_traits< allocator_type >::size_type boost::container::allocator_traits< allocator_type >::difference_type implementation_defined implementation_defined Compare implementation_defined implementation_defined implementation_defined implementation_defined std::pair< key_type, mapped_type > implementation_defined implementation_defined implementation_defined (dtl::is_same< typename allocator_type::value_type, std::pair< const Key, T > >::value) allocator_typeEffects: Returns a copy of the allocator that was passed to the object's constructor.Complexity: Constant. stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. const stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. iteratorEffects: Returns an iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant. iteratorEffects: Returns an iterator to the end of the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the container.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. boolEffects: Returns true if the container contains no elements.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the number of the elements contained in the container.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the largest possible size of the container.Throws: Nothing.Complexity: Constant. mapped_type &const key_type &Effects: If there is no key equivalent to x in the map, inserts value_type(x, T()) into the map.Returns: A reference to the mapped_type corresponding to x in *this.Complexity: Logarithmic. mapped_type &key_type &&Effects: If there is no key equivalent to x in the map, inserts value_type(boost::move(x), T()) into the map (the key is move-constructed)Returns: A reference to the mapped_type corresponding to x in *this.Complexity: Logarithmic. std::pair< iterator, bool >const key_type &M &&Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj) to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value as if by insert, constructing it from value_type(k, forward<M>(obj)).No iterators or references are invalidated. If the insertion is successful, pointers and references to the element obtained while it is held in the node handle are invalidated, and pointers and references obtained to that element before it was extracted become valid.Returns: The bool component is true if the insertion took place and false if the assignment took place. The iterator component is pointing at the element that was inserted or updated.Complexity: Logarithmic in the size of the container. std::pair< iterator, bool >key_type &&M &&Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj) to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value as if by insert, constructing it from value_type(k, move(obj)).No iterators or references are invalidated. If the insertion is successful, pointers and references to the element obtained while it is held in the node handle are invalidated, and pointers and references obtained to that element before it was extracted become valid.Returns: The bool component is true if the insertion took place and false if the assignment took place. The iterator component is pointing at the element that was inserted or updated.Complexity: Logarithmic in the size of the container. iteratorconst_iteratorconst key_type &M &&Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj) to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value as if by insert, constructing it from value_type(k, forward<M>(obj)) and the new element to the container as close as possible to the position just before hint.No iterators or references are invalidated. If the insertion is successful, pointers and references to the element obtained while it is held in the node handle are invalidated, and pointers and references obtained to that element before it was extracted become valid.Returns: The bool component is true if the insertion took place and false if the assignment took place. The iterator component is pointing at the element that was inserted or updated.Complexity: Logarithmic in the size of the container in general, but amortized constant if the new element is inserted just before hint. iteratorconst_iteratorkey_type &&M &&Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj) to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value as if by insert, constructing it from value_type(k, move(obj)) and the new element to the container as close as possible to the position just before hint.No iterators or references are invalidated. If the insertion is successful, pointers and references to the element obtained while it is held in the node handle are invalidated, and pointers and references obtained to that element before it was extracted become valid.Returns: The bool component is true if the insertion took place and false if the assignment took place. The iterator component is pointing at the element that was inserted or updated.Complexity: Logarithmic in the size of the container in general, but amortized constant if the new element is inserted just before hint. T &const key_type &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 &const key_type &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. std::pair< iterator, bool >const value_type &Effects: Inserts x if and only if there is no element in the container with key equivalent to the key of x.Returns: 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.Complexity: Logarithmic. std::pair< iterator, bool >const nonconst_value_type &Effects: Inserts a new value_type created from the pair if and only if there is no element in the container with key equivalent to the key of x.Returns: 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.Complexity: Logarithmic. std::pair< iterator, bool >nonconst_value_type &&Effects: Inserts a new value_type move constructed from the pair if and only if there is no element in the container with key equivalent to the key of x.Returns: 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.Complexity: Logarithmic. std::pair< iterator, bool >movable_value_type &&Effects: Inserts a new value_type move constructed from the pair if and only if there is no element in the container with key equivalent to the key of x.Returns: 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.Complexity: Logarithmic. std::pair< iterator, bool >value_type &&Effects: 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.Returns: 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.Complexity: Logarithmic. iteratorconst_iteratorconst value_type &Effects: Inserts a copy of x 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.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. iteratorconst_iteratornonconst_value_type &&Effects: 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. 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. iteratorconst_iteratormovable_value_type &&Effects: 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. 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. iteratorconst_iteratorconst nonconst_value_type &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. iteratorconst_iteratorvalue_type &&Effects: Inserts an element 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. voidInputIteratorInputIteratorRequires: first, last are not iterators into *this.Effects: inserts each element from the range [first,last) if and only if there is no element with key equivalent to the key of that element.Complexity: At most N log(size()+N) (N is the distance from first to last) voidstd::initializer_list< value_type >Effects: inserts each element from the range [il.begin(), il.end()) if and only if there is no element with key equivalent to the key of that element.Complexity: At most N log(size()+N) (N is the distance from il.begin() to il.end()) insert_return_typenode_type &&Requires: nh is empty or this->get_allocator() == nh.get_allocator().Effects: If nh is empty, has no effect. Otherwise, inserts the element owned by nh if and only if there is no element in the container with a key equivalent to nh.key().Returns: If nh is empty, insert_return_type.inserted is false, insert_return_type.position is end(), and insert_return_type.node is empty. Otherwise if the insertion took place, insert_return_type.inserted is true, insert_return_type.position points to the inserted element, and insert_return_type.node is empty; if the insertion failed, insert_return_type.inserted is false, insert_return_type.node has the previous value of nh, and insert_return_type.position points to an element with a key equivalent to nh.key().Complexity: Logarithmic insert_return_typeconst_iteratornode_type &&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". std::pair< iterator, bool >Args &&...Effects: Inserts an object x of type T constructed with std::forward<Args>(args)... in the container if and only if there is no element in the container with an equivalent key. p is a hint pointing to where the insert should start to search.Returns: 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.Complexity: Logarithmic in general, but amortized constant if t is inserted right before p. iteratorconst_iteratorArgs &&...Effects: 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 an equivalent key. 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. std::pair< iterator, bool >const key_type &Args &&...Requires: value_type shall be EmplaceConstructible into map from piecewise_construct, forward_as_tuple(k), forward_as_tuple(forward<Args>(args)...).Effects: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(k), forward_as_tuple(forward<Args>(args)...).Returns: The bool component of the returned pair is true if and only if the insertion took place. The returned iterator points to the map element whose key is equivalent to k.Complexity: Logarithmic. iteratorconst_iteratorconst key_type &Args &&...Requires: value_type shall be EmplaceConstructible into map from piecewise_construct, forward_as_tuple(k), forward_as_tuple(forward<Args>(args)...).Effects: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(k), forward_as_tuple(forward<Args>(args)...).Returns: The returned iterator points to the map element whose key is equivalent to k.Complexity: Logarithmic in general, but amortized constant if value is inserted right before p. std::pair< iterator, bool >key_type &&Args &&...Requires: value_type shall be EmplaceConstructible into map from piecewise_construct, forward_as_tuple(move(k)), forward_as_tuple(forward<Args>(args)...).Effects: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(move(k)), forward_as_tuple(forward<Args>(args)...).Returns: The bool component of the returned pair is true if and only if the insertion took place. The returned iterator points to the map element whose key is equivalent to k.Complexity: Logarithmic. iteratorconst_iteratorkey_type &&Args &&...Requires: value_type shall be EmplaceConstructible into map from piecewise_construct, forward_as_tuple(move(k)), forward_as_tuple(forward<Args>(args)...).Effects: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(move(k)), forward_as_tuple(forward<Args>(args)...).Returns: The returned iterator points to the map element whose key is equivalent to k.Complexity: Logarithmic in general, but amortized constant if value is inserted right before p. iteratorconst_iteratorEffects: 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_typeconst key_type &Effects: Erases all elements in the container with key equivalent to x.Returns: Returns the number of erased elements.Complexity: log(size()) + count(k) iteratorconst_iteratorconst_iteratorEffects: 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_typeconst key_type &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(size()). node_typeconst_iteratorEffects: Removes the element pointed to by "position".Returns: A node_type owning the element, otherwise an empty node_type.Complexity: Amortized constant. voidmap< Key, T, C2, Allocator, Options > &Requires: this->get_allocator() == source.get_allocator().Effects: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.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(size() + N) (N has the value source.size()) voidmap< Key, T, C2, Allocator, Options > &&Requires: this->get_allocator() == source.get_allocator().Effects: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.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(size() + N) (N has the value source.size()) voidmultimap< Key, T, C2, Allocator, Options > &Requires: this->get_allocator() == source.get_allocator().Effects: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.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(size() + N) (N has the value source.size()) voidmultimap< Key, T, C2, Allocator, Options > &&Requires: this->get_allocator() == source.get_allocator().Effects: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.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(size() + N) (N has the value source.size()) voidmap &Effects: Swaps the contents of *this and x.Throws: Nothing.Complexity: Constant. Effects: erase(begin(),end()).Postcondition: size() == 0.Complexity: linear in size(). key_compareEffects: Returns the comparison object out of which a was constructed.Complexity: Constant. value_compareEffects: Returns an object of value_compare constructed out of the comparison object.Complexity: Constant. iteratorconst key_type &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_iteratorconst key_type &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. iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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_iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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_typeconst key_type &Returns: The number of elements with key equivalent to x.Complexity: log(size())+count(k) size_typeconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: The number of elements with key equivalent to x.Complexity: log(size())+count(k) boolconst key_type &Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.Complexity: log(size()). boolconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.Complexity: log(size()). iteratorconst key_type &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_iteratorconst key_type &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 iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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_iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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 iteratorconst key_type &Returns: An iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic const_iteratorconst key_type &Returns: A const iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: An iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic const_iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: A const iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic std::pair< iterator, iterator >const key_type &Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic std::pair< const_iterator, const_iterator >const key_type &Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic std::pair< iterator, iterator >const K &Requires: This overload is available only if key_compare::is_transparent exists.Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic std::pair< const_iterator, const_iterator >const K &Requires: This overload is available only if key_compare::is_transparent exists.Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic voidEffects: Rebalances the tree. It's a no-op for Red-Black and AVL trees.Complexity: Linear Effects: Default constructs an empty map.Complexity: Constant. const Compare &const allocator_type &Effects: Constructs an empty map using the specified comparison object and allocator.Complexity: Constant. const Compare &Effects: Constructs an empty map using the specified comparison object.Complexity: Constant. const allocator_type &Effects: Constructs an empty map using the specified allocator.Complexity: Constant. InputIteratorInputIteratorEffects: Constructs an empty map and inserts elements from the range [first ,last ).Complexity: Linear in N if the range [first ,last ) is already sorted using the predicate and otherwise N logN, where N is last - first. InputIteratorInputIteratorconst allocator_type &Effects: Constructs an empty map using the specified allocator, and inserts elements from the range [first ,last ).Complexity: Linear in N if the range [first ,last ) is already sorted using the predicate and otherwise N logN, where N is last - first. InputIteratorInputIteratorconst Compare &Effects: Constructs an empty map using the specified comparison object and inserts elements from the range [first ,last ).Complexity: Linear in N if the range [first ,last ) is already sorted using the predicate and otherwise N logN, where N is last - first. InputIteratorInputIteratorconst Compare &const allocator_type &Effects: Constructs an empty map 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 the predicate and otherwise N logN, where N is last - first. ordered_unique_range_tInputIteratorInputIteratorEffects: Constructs an empty map and inserts elements from the ordered unique 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 and must be unique values.Complexity: Linear in N.Note: Non-standard extension. ordered_unique_range_tInputIteratorInputIteratorconst Compare &Effects: Constructs an empty map using the specified comparison object and inserts elements from the ordered unique 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 and must be unique values.Complexity: Linear in N.Note: Non-standard extension. ordered_unique_range_tInputIteratorInputIteratorconst Compare &const allocator_type &Effects: Constructs an empty map using the specified comparison object and allocator, and inserts elements from the ordered unique 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 and must be unique values.Complexity: Linear in N.Note: Non-standard extension. ordered_unique_range_tInputIteratorInputIteratorconst allocator_type &Effects: Constructs an empty map using the specified allocator object and inserts elements from the ordered unique 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 and must be unique values.Complexity: Linear in N.Note: Non-standard extension. std::initializer_list< value_type >Effects: Constructs an empty map and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [first ,last ) is already sorted according to the predicate and otherwise N logN, where N is il.first() - il.end(). std::initializer_list< value_type >const Compare &Effects: Constructs an empty map using the specified comparison object and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [first ,last ) is already sorted using the predicate and otherwise N logN, where N is il.first() - il.end(). std::initializer_list< value_type >const allocator_type &Effects: Constructs an empty map using the specified allocator, and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [first ,last ) is already sorted using the predicate and otherwise N logN, where N is il.first() - il.end(). std::initializer_list< value_type >const Compare &const allocator_type &Effects: Constructs an empty map 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 the predicate and otherwise N logN, where N is il.first() - il.end(). ordered_unique_range_tstd::initializer_list< value_type >Effects: Constructs an empty map and inserts elements from the ordered unique range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be unique values.Complexity: Linear in N.Note: Non-standard extension. ordered_unique_range_tstd::initializer_list< value_type >const Compare &Effects: Constructs an empty map using the specified comparison object, and inserts elements from the ordered unique range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be unique values.Complexity: Linear in N.Note: Non-standard extension. ordered_unique_range_tstd::initializer_list< value_type >const Compare &const allocator_type &Effects: Constructs an empty map using the specified comparison object and allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be unique values.Complexity: Linear in N.Note: Non-standard extension. const map &Effects: Copy constructs a map.Complexity: Linear in x.size(). map &&Effects: Move constructs a map. Constructs *this using x's resources.Complexity: Constant.Postcondition: x is emptied. const map &const allocator_type &Effects: Copy constructs a map using the specified allocator.Complexity: Linear in x.size(). map &&const allocator_type &Effects: Move constructs a map using the specified allocator. Constructs *this using x's resources.Complexity: Constant if x == x.get_allocator(), linear otherwise.Postcondition: x is emptied. map &const map &Effects: Makes *this a copy of x.Complexity: Linear in x.size(). map &map &&Effects: this->swap(x.get()).Throws: If allocator_traits_type::propagate_on_container_move_assignment is false and (allocation throws or value_type's move constructor throws)Complexity: Constant if allocator_traits_type:: propagate_on_container_move_assignment is true or this->get>allocator() == x.get_allocator(). Linear otherwise. map &std::initializer_list< value_type >Effects: Assign content of il to *this. friend boolconst map &const map &Effects: Returns true if x and y are equalComplexity: Linear to the number of elements in the container. friend boolconst map &const map &Effects: Returns true if x and y are unequalComplexity: Linear to the number of elements in the container. friend boolconst map &const map &Effects: Returns true if x is less than yComplexity: Linear to the number of elements in the container. friend boolconst map &const map &Effects: Returns true if x is greater than yComplexity: Linear to the number of elements in the container. friend boolconst map &const map &Effects: Returns true if x is equal or less than yComplexity: Linear to the number of elements in the container. friend boolconst map &const map &Effects: Returns true if x is equal or greater than yComplexity: Linear to the number of elements in the container. friend voidmap &map &Effects: x.swap(y)Complexity: Constant. A multimap is a kind of associative container that supports equivalent keys (possibly containing multiple copies of the same key value) and provides for fast retrieval of values of another type T based on the keys. The multimap class supports bidirectional iterators.A multimap satisfies all of the requirements of a container and of a reversible container and of an associative container. The value_type stored by this container is the value_type is std::pair<const Key, T>. Key T base_t::allocator_type ::boost::container::allocator_traits< allocator_type > boost::container::allocator_traits< allocator_type >::value_type boost::container::allocator_traits< allocator_type >::pointer boost::container::allocator_traits< allocator_type >::const_pointer boost::container::allocator_traits< allocator_type >::reference boost::container::allocator_traits< allocator_type >::const_reference boost::container::allocator_traits< allocator_type >::size_type boost::container::allocator_traits< allocator_type >::difference_type implementation_defined implementation_defined Compare implementation_defined implementation_defined implementation_defined implementation_defined std::pair< key_type, mapped_type > implementation_defined implementation_defined (dtl::is_same< typename allocator_type::value_type, std::pair< const Key, T > >::value) allocator_typeEffects: Returns a copy of the allocator that was passed to the object's constructor.Complexity: Constant. stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. const stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. iteratorEffects: Returns an iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant const_iteratorEffects: Returns a const_iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant. iteratorEffects: Returns an iterator to the end of the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the container.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. boolEffects: Returns true if the container contains no elements.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the number of the elements contained in the container.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the largest possible size of the container.Throws: Nothing.Complexity: Constant. iteratorArgs &&...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. iteratorconst_iteratorArgs &&...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. iteratorconst value_type &Effects: Inserts x and returns the iterator pointing to the newly inserted element.Complexity: Logarithmic. iteratorconst nonconst_value_type &Effects: Inserts a new value constructed from x and returns the iterator pointing to the newly inserted element.Complexity: Logarithmic. iteratornonconst_value_type &&Effects: Inserts a new value move-constructed from x and returns the iterator pointing to the newly inserted element.Complexity: Logarithmic. iteratormovable_value_type &&Effects: Inserts a new value move-constructed from x and returns the iterator pointing to the newly inserted element.Complexity: Logarithmic. iteratorconst_iteratorconst value_type &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. iteratorconst_iteratorconst nonconst_value_type &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. iteratorconst_iteratornonconst_value_type &&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. iteratorconst_iteratormovable_value_type &&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. voidInputIteratorInputIteratorRequires: 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) voidstd::initializer_list< value_type >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()) iteratornode_type &&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 iteratorconst_iteratornode_type &&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". iteratorconst_iteratorEffects: 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_typeconst key_type &Effects: Erases all elements in the container with key equivalent to x.Returns: Returns the number of erased elements.Complexity: log(size()) + count(k) iteratorconst_iteratorconst_iteratorEffects: 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_typeconst key_type &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(size()). node_typeconst_iteratorEffects: Removes the element pointed to by "position".Returns: A node_type owning the element, otherwise an empty node_type.Complexity: Amortized constant. voidmultimap< Key, T, C2, Allocator, Options > &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(size() + N) (N has the value source.size()) voidmultimap< Key, T, C2, Allocator, Options > &&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(size() + N) (N has the value source.size()) voidmap< Key, T, C2, Allocator, Options > &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(size() + N) (N has the value source.size()) voidmap< Key, T, C2, Allocator, Options > &&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(size() + N) (N has the value source.size()) voidmultiset &Effects: Swaps the contents of *this and x.Throws: Nothing.Complexity: Constant. voidEffects: erase(begin(),end()).Postcondition: size() == 0.Complexity: linear in size(). key_compareEffects: Returns the comparison object out of which a was constructed.Complexity: Constant. value_compareEffects: Returns an object of value_compare constructed out of the comparison object.Complexity: Constant. iteratorconst key_type &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_iteratorconst key_type &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. iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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_iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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_typeconst key_type &Returns: The number of elements with key equivalent to x.Complexity: log(size())+count(k) size_typeconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: The number of elements with key equivalent to x.Complexity: log(size())+count(k) boolconst key_type &Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.Complexity: log(size()). boolconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.Complexity: log(size()). iteratorconst key_type &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_iteratorconst key_type &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 iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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_iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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 iteratorconst key_type &Returns: An iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic const_iteratorconst key_type &Returns: A const iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: An iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic const_iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: A const iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic std::pair< iterator, iterator >const key_type &Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic std::pair< const_iterator, const_iterator >const key_type &Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic std::pair< iterator, iterator >const K &Requires: This overload is available only if key_compare::is_transparent exists.Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic std::pair< const_iterator, const_iterator >const K &Requires: This overload is available only if key_compare::is_transparent exists.Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic voidEffects: Rebalances the tree. It's a no-op for Red-Black and AVL trees.Complexity: Linear Effects: Default constructs an empty multimap.Complexity: Constant. const allocator_type &Effects: Constructs an empty multimap using the specified allocator object and allocator.Complexity: Constant. const Compare &Effects: Constructs an empty multimap using the specified comparison.Complexity: Constant. const Compare &const allocator_type &Effects: Constructs an empty multimap using the specified comparison and allocator.Complexity: Constant. InputIteratorInputIteratorEffects: Constructs an empty multimap and inserts elements from the range [first ,last ).Complexity: Linear in N if the range [first ,last ) is already sorted using the predicate and otherwise N logN, where N is last - first. InputIteratorInputIteratorconst allocator_type &Effects: Constructs an empty multimap using the specified allocator, and inserts elements from the range [first ,last ).Complexity: Linear in N if the range [first ,last ) is already sorted using the predicate and otherwise N logN, where N is last - first. InputIteratorInputIteratorconst Compare &Effects: Constructs an empty multimap using the specified comparison object and inserts elements from the range [first ,last ).Complexity: Linear in N if the range [first ,last ) is already sorted using the predicate and otherwise N logN, where N is last - first. InputIteratorInputIteratorconst Compare &const allocator_type &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 the predicate and otherwise N logN, where N is last - first. ordered_range_tInputIteratorInputIteratorEffects: Constructs an empty multimap 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. ordered_range_tInputIteratorInputIteratorconst Compare &Effects: Constructs an empty multimap using the specified comparison object 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. ordered_range_tInputIteratorInputIteratorconst Compare &const allocator_type &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. ordered_range_tInputIteratorInputIteratorconst allocator_type &Effects: Constructs an empty multimap using the specified 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. std::initializer_list< value_type >Effects: Constructs an empty multimap and and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [first ,last ) is already sorted using the predicate and otherwise N logN, where N is il.first() - il.end(). std::initializer_list< value_type >const allocator_type &Effects: Constructs an empty multimap using the specified allocator, and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [first ,last ) is already sorted using the predicate and otherwise N logN, where N is il.first() - il.end(). std::initializer_list< value_type >const Compare &Effects: Constructs an empty multimap using the specified comparison object and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [first ,last ) is already sorted using the predicate and otherwise N logN, where N is il.first() - il.end(). std::initializer_list< value_type >const Compare &const allocator_type &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 the predicate and otherwise N logN, where N is il.first() - il.end(). ordered_range_tstd::initializer_list< value_type >Effects: Constructs an empty map and inserts elements from the ordered range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate.Complexity: Linear in N.Note: Non-standard extension. ordered_range_tstd::initializer_list< value_type >const Compare &Effects: Constructs an empty map using the specified comparison object and inserts elements from the ordered range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate.Complexity: Linear in N.Note: Non-standard extension. ordered_range_tstd::initializer_list< value_type >const Compare &const allocator_type &Effects: Constructs an empty map and inserts elements from the ordered range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate.Complexity: Linear in N.Note: Non-standard extension. const multimap &Effects: Copy constructs a multimap.Complexity: Linear in x.size(). multimap &&Effects: Move constructs a multimap. Constructs *this using x's resources.Complexity: Constant.Postcondition: x is emptied. const multimap &const allocator_type &Effects: Copy constructs a multimap.Complexity: Linear in x.size(). multimap &&const allocator_type &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. multimap &const multimap &Effects: Makes *this a copy of x.Complexity: Linear in x.size(). multimap &multimap &&Effects: this->swap(x.get()).Complexity: Constant. multimap &std::initializer_list< value_type >Effects: Assign content of il to *this. friend boolconst multimap &const multimap &Effects: Returns true if x and y are equalComplexity: Linear to the number of elements in the container. friend boolconst multimap &const multimap &Effects: Returns true if x and y are unequalComplexity: Linear to the number of elements in the container. friend boolconst multimap &const multimap &Effects: Returns true if x is less than yComplexity: Linear to the number of elements in the container. friend boolconst multimap &const multimap &Effects: Returns true if x is greater than yComplexity: Linear to the number of elements in the container. friend boolconst multimap &const multimap &Effects: Returns true if x is equal or less than yComplexity: Linear to the number of elements in the container. friend boolconst multimap &const multimap &Effects: Returns true if x is equal or greater than yComplexity: Linear to the number of elements in the container. friend voidmultimap &multimap &Effects: x.swap(y)Complexity: Constant. InputIteratorInputIterator InputIteratorInputIteratorAllocatorOrCompare const & InputIteratorInputIteratorCompare const &Allocator const & ordered_unique_range_tInputIteratorInputIterator ordered_unique_range_tInputIteratorInputIteratorAllocatorOrCompare const & ordered_unique_range_tInputIteratorInputIteratorCompare const &Allocator const & InputIteratorInputIterator InputIteratorInputIteratorAllocatorOrCompare const & InputIteratorInputIteratorCompare const &Allocator const & ordered_range_tInputIteratorInputIterator ordered_range_tInputIteratorInputIteratorAllocatorOrCompare const & ordered_range_tInputIteratorInputIteratorCompare const &Allocator const &
A portable metafunction to obtain a map that uses a polymorphic allocator boost::container::map< Key, T, Compare, polymorphic_allocator< std::pair< const Key, T > >, Options > A portable metafunction to obtain a multimap that uses a polymorphic allocator boost::container::multimap< Key, T, Compare, polymorphic_allocator< std::pair< const Key, T > >, Options > boost::container::map< Key, T, Compare, polymorphic_allocator< std::pair< const Key, T > >, Options > boost::container::multimap< Key, T, Compare, polymorphic_allocator< std::pair< const Key, T > >, Options >
This class is a reduced STL-compatible allocator that allocates memory using operator new. Obtains an new_allocator that allocates objects of type T2 new_allocator< T2 > T T * const T * T & const T & std::size_t std::ptrdiff_t A integral constant of type bool with value true. implementation_defined A integral constant of type bool with value true. implementation_defined pointersize_typeAllocates memory for an array of count elements. Throws std::bad_alloc if there is no enough memory voidpointersize_typeDeallocates previously allocated memory. Never throws size_typeReturns the maximum number of elements that could be allocated. Never throws Default constructor Never throws const new_allocator &Constructor from other new_allocator. Never throws new_allocator &const new_allocator &Copy assignment operator from other new_allocator. Never throws const new_allocator< T2 > &Constructor from related new_allocator. Never throws friend voidnew_allocator &new_allocator &Swaps two allocators, does nothing because this new_allocator is stateless friend boolconst new_allocator &const new_allocator &An new_allocator always compares to true, as memory allocated with one instance can be deallocated by another instance friend boolconst new_allocator &const new_allocator &An new_allocator always compares to false, as memory allocated with one instance can be deallocated by another instance voidSpecialization of new_allocator for void types. Obtains an new_allocator that allocates objects of type T2 new_allocator< T2 > void void * const void * A integral constant of type bool with value true. implementation_defined A integral constant of type bool with value true. implementation_defined Default constructor Never throws const new_allocator &Constructor from other new_allocator. Never throws new_allocator &const new_allocator &Copy assignment operator from other new_allocator. Never throws const new_allocator< T2 > &Constructor from related new_allocator. Never throws friend voidnew_allocator &new_allocator &Swaps two allocators, does nothing because this new_allocator is stateless friend boolconst new_allocator &const new_allocator &An new_allocator always compares to true, as memory allocated with one instance can be deallocated by another instance friend boolconst new_allocator &const new_allocator &An new_allocator always compares to false, as memory allocated with one instance can be deallocated by another instance
An STL node allocator that uses a modified DlMalloc as memory source.This node allocator shares a segregated storage between all instances of node_allocator with equal sizeof(T).NodesPerBlock is the number of nodes allocated at once when the allocator runs out of nodes Obtains node_allocator from node_allocator node_allocator< T2, NodesPerBlock > T T * const T * ::boost::container::dtl::unvoid_ref< T >::type ::boost::container::dtl::unvoid_ref< const T >::type std::size_t std::ptrdiff_t boost::container::dtl::version_type< self_t, Version > size_typeReturns the number of elements that could be allocated. Never throws pointersize_typeconst void *0Allocate memory for an array of count elements. Throws std::bad_alloc if there is no enough memory voidconst pointer &size_typeDeallocate allocated memory. Never throws pointerallocation_typesize_typesize_type &pointer & size_typepointerReturns maximum the number of objects the previously allocated memory pointed by p can hold. pointerAllocates just one object. Memory allocated with this function must be deallocated only with deallocate_one(). Throws bad_alloc if there is no enough memory voidstd::size_tmultiallocation_chain &Allocates many elements of size == 1. Elements must be individually deallocated with deallocate_one() voidpointerDeallocates memory previously allocated with allocate_one(). You should never use deallocate_one to deallocate memory allocated with other functions different from allocate_one(). Never throws voidmultiallocation_chain & voidsize_typestd::size_tmultiallocation_chain &Allocates many elements of size elem_size. Elements must be individually deallocated with deallocate() voidconst size_type *size_typemultiallocation_chain &Allocates n_elements elements, each one of size elem_sizes[i] Elements must be individually deallocated with deallocate() voidmultiallocation_chain & Default constructor. const node_allocator &Copy constructor from other node_allocator. const node_allocator< T2, NodesPerBlock > &Copy constructor from related node_allocator. Destructor. voidDeallocates all free blocks of the pool. friend voidself_t &self_t &Swaps allocators. Does not throw. If each allocator is placed in a different memory segment, the result is undefined. friend boolconst node_allocator &const node_allocator &An allocator always compares to true, as memory allocated with one instance can be deallocated by another instance friend boolconst node_allocator &const node_allocator &An allocator always compares to false, as memory allocated with one instance can be deallocated by another instance pointerallocation_typestd::size_tsize_type &pointer &
A class template used to describe the results of inserting a Container::node_type in a Container with unique keys. Includes at least the following non-static public data members: bool inserted; Iterator position; NodeType node This type is MoveConstructible, MoveAssignable, DefaultConstructible, Destructible, and lvalues of that type are swappable bool Iterator NodeType insert_return_type_base && boolRelatedItRelatedNode && insert_return_type_base &insert_return_type_base && A node_handle is an object that accepts ownership of a single element from an associative container. It may be used to transfer that ownership to another container with compatible nodes. Containers with compatible nodes have the same node handle type. Elements may be transferred in either direction between container types in the same row:.Container types with compatible nodesmap<K, T, C1, A> <-> map<K, T, C2, A>map<K, T, C1, A> <-> multimap<K, T, C2, A>set<K, C1, A> <-> set<K, C2, A>set<K, C1, A> <-> multiset<K, C2, A>If a node handle is not empty, then it contains an allocator that is equal to the allocator of the container when the element was extracted. If a node handle is empty, it contains no allocator. priv_value_t keymapped_t::key_type keymapped_t::mapped_type nator_traits::template portable_rebind_alloc< value_type >::type priv_node_t friend voidnode_handle &node_handle &Effects: x.swap(y). value_type &Requires: empty() == false.Returns: A reference to the value_type subobject in the container_node_type object pointed to by m_ptrThrows: Nothing. key_type &Requires: empty() == false.Returns: A non-const reference to the key_type member of the value_type subobject in the container_node_type object pointed to by m_ptr.Throws: Nothing.Requires: Modifying the key through the returned reference is permitted. mapped_type &Requires: empty() == false.Returns: A reference to the mapped_type member of the value_type subobject in the container_node_type object pointed to by m_ptrThrows: Nothing. allocator_typeRequires: empty() == false.Returns: A copy of the internally hold allocator.Throws: Nothing. boolReturns: m_ptr != nullptr. boolReturns: m_ptr == nullptr. voidnode_handle &Requires: this->empty(), or nh.empty(), or nator_traits::propagate_on_container_swap is true, or node_alloc() == nh.node_alloc().Effects: Calls swap(m_ptr, nh.m_ptr). If this->empty(), or nh.empty(), or nator_traits::propagate_on_- container_swap is true calls swap(node_alloc(), nh.node_alloc()). node_pointerEffects: If this->empty() returns nullptr, otherwise returns m_ptr resets m_ptr to nullptr and destroys the internal allocator.Postcondition: this->empty()Note: Non-standard extensions node_pointerEffects: Returns m_ptr.Note: Non-standard extensions nallocator_type &Effects: Returns a reference to the internal node allocator.Note: Non-standard extensions const nallocator_type &Effects: Returns a reference to the internal node allocator.Note: Non-standard extensions Effects: Initializes m_ptr to nullptr.Postcondition: this->empty() node_pointerconst nallocator_type &Effects: Constructs a node_handle object initializing internal pointer with p. If p != nullptr copy constructs internal allocator from al. node_handle< NodeAllocator, KeyMapped2 > &&typename dtl::enable_if_c<((unsigned) dtl::is_same< KeyMapped, void >::value+(unsigned) dtl::is_same< KeyMapped2, void >::value)==1u >::type *0Effects: Constructs a node_handle object initializing internal pointer with a related nh's internal pointer and assigns nullptr to the later. If nh's internal pointer was not nullptr, move constructs internal allocator with nh's internal allocator and destroy nh's internal allocator.Postcondition: nh.empty()Note: Two node_handle's are related if only one of KeyMapped template parameter of a node handle is void. node_handle &&Effects: Constructs a node_handle object initializing internal pointer with nh's internal pointer and assigns nullptr to the later. If nh's internal pointer was not nullptr, move constructs internal allocator with nh's internal allocator and destroy nh's internal allocator.Postcondition: nh.empty() Effects: If !this->empty(), destroys the value_type subobject in the container_node_type object pointed to by c by calling allocator_traits<impl_defined>::destroy, then deallocates m_ptr by calling nator_traits::rebind_traits<container_node_type>::deallocate. node_handle &node_handle &&Requires: Either this->empty(), or nator_traits::propagate_on_container_move_assignment is true, or node_alloc() == nh.node_alloc().Effects: If m_ptr != nullptr, destroys the value_type subobject in the container_node_type object pointed to by m_ptr by calling nator_traits::destroy, then deallocates m_ptr by calling nator_traits::deallocate. Assigns nh.m_ptr to m_ptr. If this->empty() or nator_traits::propagate_on_container_move_assignment is true, move assigns nh.node_alloc() to node_alloc(). Assigns nullptr to nh.m_ptr and assigns nullopt to nh.node_alloc().Returns: *this.Throws: Nothing.
This option specifies the maximum size of a block in bytes: this delimites the number of contiguous elements that will be allocated by deque as min(1u, BlockBytes/sizeof(value_type)) A value zero represents the default value. This option specifies the size of a block, delimites the number of contiguous elements that will be allocated by deque as BlockSize. A value zero represents the default value. Helper metafunction to combine options into a single type to be used by boost::container::deque. Supported options are: boost::container::block_bytes implementation_defined defined(BOOST_CONTAINER_DOXYGEN_INVOKED) This option setter specifies the growth factor strategy of the underlying vector. Predefined growth factors that can be passed as arguments to this option are: boost::container::growth_factor_50 boost::container::growth_factor_60 boost::container::growth_factor_100 If this option is not specified, a default will be used by the container. This growth factor argument specifies that the container should increase it's capacity a 100% (doubling its capacity) when existing capacity is exhausted. defined(BOOST_CONTAINER_DOXYGEN_INVOKED) This growth factor argument specifies that the container should increase it's capacity a 50% when existing capacity is exhausted. This growth factor argument specifies that the container should increase it's capacity a 60% when existing capacity is exhausted. Helper metafunction to combine options into a single type to be used by boost::container::hash_set, boost::container::hash_multiset boost::container::hash_map and boost::container::hash_multimap. Supported options are: boost::container::store_hash implementation_defined This option specifies the desired alignment for the value_type stored in the container. A value zero represents the natural alignment. This option setter specifies if node size is optimized storing rebalancing data masked into pointers for ordered associative containers defined(BOOST_CONTAINER_DOXYGEN_INVOKED) Helper metafunction to combine options into a single type to be used by boost::container::small_vector. Supported options are: boost::container::growth_factor and boost::container::inplace_alignment implementation_defined defined(BOOST_CONTAINER_DOXYGEN_INVOKED) Helper metafunction to combine options into a single type to be used by boost::container::static_vector. Supported options are: boost::container::throw_on_overflow and boost::container::inplace_alignment implementation_defined defined(BOOST_CONTAINER_DOXYGEN_INVOKED) This option setter specifies if node size is optimized storing rebalancing data masked into pointers for ordered associative containers This option specifies the unsigned integer type that a user wants the container to use to hold size-related information inside a container (e.g. current size, current capacity). If the maximum capacity() to be used is limited, a user can try to use 8-bit, 16-bit (e.g. in 32-bit machines), or 32-bit size types (e.g. in a 64 bit machine) to see if some memory can be saved for empty vectors. This could potentially performance benefits due to better cache usage.Note that alignment requirements can disallow theoretical space savings. Example: vector holds a pointer and two size types (for size and capacity), in a 32 bit machine a 8 bit size type (total size: 4 byte pointer + 2 x 1 byte sizes = 6 bytes) will not save space when comparing two 16-bit size types because usually a 32 bit alignment is required for vector and the size will be rounded to 8 bytes. In a 64-bit machine a 16 bit size type does not usually save memory when comparing to a 32-bit size type. Measure the size of the resulting container and do not assume a smaller stored_size will always lead to a smaller sizeof(container).If a user tries to insert more elements than representable by stored_size, vector will throw a length_error.If this option is not specified, allocator_traits<A>::size_type (usually std::size_t) will be used to store size-related information inside the container. This option specifies if the container will throw if in the static capacity is not sufficient to hold the required values. If false is specified, insufficient capacity will lead to BOOST_ASSERT, and if this assertion returns, to undefined behaviour, which potentially can lead to better static_vector performance. The default value is true. Helper metafunction to combine options into a single type to be used by boost::container::set, boost::container::multiset boost::container::map and boost::container::multimap. Supported options are: boost::container::optimize_size and boost::container::tree_type implementation_defined defined(BOOST_CONTAINER_DOXYGEN_INVOKED) This option setter specifies the underlying tree type (red-black, AVL, Scapegoat or Splay) for ordered associative containers Helper metafunction to combine options into a single type to be used by boost::container::vector. Supported options are: boost::container::growth_factor and boost::container::stored_size implementation_defined Enumeration used to configure ordered associative containers with a concrete tree implementation. Helper alias metafunction to combine options into a single type to be used by tree-based associative containers typename boost::container::tree_assoc_options< Options... >::type Helper alias metafunction to combine options into a single type to be used by hash-based associative containers typename boost::container::hash_assoc_options< Options... >::type Helper alias metafunction to combine options into a single type to be used by boost::container::vector. Supported options are: boost::container::growth_factor and boost::container::stored_size typename boost::container::vector_options< Options... >::type Helper alias metafunction to combine options into a single type to be used by boost::container::small_vector. Supported options are: boost::container::growth_factor and boost::container::stored_size typename boost::container::small_vector_options< Options... >::type Helper alias metafunction to combine options into a single type to be used by boost::container::static_vector. Supported options are: boost::container::growth_factor and boost::container::stored_size typename boost::container::static_vector_options< Options... >::type Helper alias metafunction to combine options into a single type to be used by boost::container::deque. Supported options are: boost::container::block_bytes typename boost::container::deque_options< Options... >::type
memory_resource *Returns: A pointer to a static-duration object of a type derived from memory_resource that can serve as a resource for allocating memory using global operator new and global operator delete. The same value is returned every time this function is called. For return value p and memory resource r, p->is_equal(r) returns &r == p. memory_resource *Returns: A pointer to a static-duration object of a type derived from memory_resource for which allocate() always throws bad_alloc and for which deallocate() has no effect. The same value is returned every time this function is called. For return value p and memory resource r, p->is_equal(r) returns &r == p. memory_resource *memory_resource *Effects: If r is non-null, sets the value of the default memory resource pointer to r, otherwise sets the default memory resource pointer to new_delete_resource().Postconditions: get_default_resource() == r.Returns: The previous value of the default memory resource pointer.Remarks: Calling the set_default_resource and get_default_resource functions shall not incur a data race. A call to the set_default_resource function shall synchronize with subsequent calls to the set_default_resource and get_default_resource functions. memory_resource *Returns: The current value of the default memory resource pointer.
The memory_resource class is an abstract interface to an unbounded set of classes encapsulating memory resources. constexpr std::size_t void *std::size_tstd::size_tmax_alignEffects: Equivalent to return do_allocate(bytes, alignment); voidvoid *std::size_tstd::size_tmax_alignEffects: Equivalent to return do_deallocate(bytes, alignment); boolconst memory_resource &Effects: Equivalent to return return do_is_equal(other); Effects: Destroys this memory_resource. friend boolconst memory_resource &const memory_resource &Returns: &a == &b || a.is_equal(b). friend boolconst memory_resource &const memory_resource &Returns: !(a == b). void *std::size_tstd::size_tRequires: Alignment shall be a power of two.Returns: A derived class shall implement this function to return a pointer to allocated storage with a size of at least bytes. The returned storage is aligned to the specified alignment, if such alignment is supported; otherwise it is aligned to max_align.Throws: A derived class implementation shall throw an appropriate exception if it is unable to allocate memory with the requested size and alignment. voidvoid *std::size_tstd::size_tRequires: p shall have been returned from a prior call to allocate(bytes, alignment) on a memory resource equal to *this, and the storage at p shall not yet have been deallocated.Effects: A derived class shall implement this function to dispose of allocated storage.Throws: Nothing. boolconst memory_resource &Returns: A derived class shall implement this function to return true if memory allocated from this can be deallocated from other and vice-versa; otherwise it shall return false. [Note: The most-derived type of other might not match the type of this. For a derived class, D, a typical implementation of this function will compute dynamic_cast<const D*>(&other) and go no further (i.e., return false) if it returns nullptr. - end note].
boost::container::pmr::memory_resourceA monotonic_buffer_resource is a special-purpose memory resource intended for very fast memory allocations in situations where memory is used to build up a few objects and then is released all at once when the memory resource object is destroyed. It has the following qualities: A call to deallocate has no effect, thus the amount of memory consumed increases monotonically until the resource is destroyed. The program can supply an initial buffer, which the allocator uses to satisfy memory requests. When the initial buffer (if any) is exhausted, it obtains additional buffers from an upstream memory resource supplied at construction. Each additional buffer is larger than the previous one, following a geometric progression. It is intended for access from one thread of control at a time. Specifically, calls to allocate and deallocate do not synchronize with one another. It owns the allocated memory and frees it on destruction, even if deallocate has not been called for some of the allocated blocks. const std::size_tThe number of bytes that will be requested by the default in the first call to the upstream allocatorNote: Non-standard extension. voidEffects: upstream_resource()->deallocate() as necessary to release all allocated memory. [Note: memory is released back to upstream_resource() even if some blocks that were allocated from this have not been deallocated from this. - end note] memory_resource *Returns: The value of the internal resource. std::size_tstd::size_tstd::size_t &Returns: The number of bytes of storage available for the specified alignment and the number of bytes wasted due to the requested alignment.Note: Non-standard extension. std::size_tstd::size_t1uReturns: The number of bytes of storage available for the specified alignment.Note: Non-standard extension. const void *Returns: The address pointing to the start of the current free storage.Note: Non-standard extension. std::size_tReturns: The number of bytes that will be requested for the next buffer once the current one is exhausted.Note: Non-standard extension. memory_resource *0Requires: upstream shall be the address of a valid memory resource or nullptrEffects: If upstream is not nullptr, sets the internal resource to upstream, to get_default_resource() otherwise. Sets the internal current_buffer to nullptr and the internal next_buffer_size to an implementation-defined size. std::size_tmemory_resource *0Requires: upstream shall be the address of a valid memory resource or nullptr and initial_size shall be greater than zero.Effects: If upstream is not nullptr, sets the internal resource to upstream, to get_default_resource() otherwise. Sets the internal current_buffer to nullptr and next_buffer_size to at least initial_size. void *std::size_tmemory_resource *0Requires: upstream shall be the address of a valid memory resource or nullptr, buffer_size shall be no larger than the number of bytes in buffer.Effects: If upstream is not nullptr, sets the internal resource to upstream, to get_default_resource() otherwise. Sets the internal current_buffer to buffer, and next_buffer_size to buffer_size (but not less than an implementation-defined size), then increases next_buffer_size by an implementation-defined growth factor (which need not be integral). const monotonic_buffer_resource & monotonic_buffer_resourceconst monotonic_buffer_resource & Effects: Calls this->release(). void *std::size_tstd::size_tReturns: A pointer to allocated storage with a size of at least bytes. The size and alignment of the allocated memory shall meet the requirements for a class derived from memory_resource.Effects: If the unused space in the internal current_buffer can fit a block with the specified bytes and alignment, then allocate the return block from the internal current_buffer; otherwise sets the internal current_buffer to upstream_resource()->allocate(n, m), where n is not less than max(bytes, next_buffer_size) and m is not less than alignment, and increase next_buffer_size by an implementation-defined growth factor (which need not be integral), then allocate the return block from the newly-allocated internal current_buffer.Throws: Nothing unless upstream_resource()->allocate() throws. voidvoid *std::size_tstd::size_tEffects: NoneThrows: NothingRemarks: Memory used by this resource increases monotonically until its destruction. boolconst memory_resource &Returns: this == dynamic_cast<const monotonic_buffer_resource*>(&other).
A specialization of class template polymorphic_allocator conforms to the Allocator requirements. Constructed with different memory resources, different instances of the same specialization of polymorphic_allocator can exhibit entirely different allocation behavior. This runtime polymorphism allows objects that use polymorphic_allocator to behave as if they used different allocator types at run time even though they use the same static allocator type. T T *size_tReturns: Equivalent to static_cast<T*>(m_resource->allocate(n * sizeof(T), alignof(T))). voidT *size_tRequires: p was allocated from a memory resource, x, equal to *m_resource, using x.allocate(n * sizeof(T), alignof(T)).Effects: Equivalent to m_resource->deallocate(p, n * sizeof(T), alignof(T)).Throws: Nothing. voidU *Args &&...Requires: Uses-allocator construction of T with allocator *this and constructor arguments std::forward<Args>(args)... is well-formed. [Note: uses-allocator construction is always well formed for types that do not use allocators. - end note]Effects: Construct a T object at p by uses-allocator construction with allocator *this and constructor arguments std::forward<Args>(args)....Throws: Nothing unless the constructor for T throws. voidU *Effects: p->~U(). polymorphic_allocatorReturns: Equivalent to polymorphic_allocator(). memory_resource *Returns: m_resource. Effects: Sets m_resource to get_default_resource(). memory_resource *Requires: r is non-null.Effects: Sets m_resource to r.Throws: NothingNotes: This constructor provides an implicit conversion from memory_resource*. Non-standard extension: if r is null m_resource is set to get_default_resource(). const polymorphic_allocator &Effects: Sets m_resource to other.resource(). const polymorphic_allocator< U > &Effects: Sets m_resource to other.resource(). polymorphic_allocator &const polymorphic_allocator &Effects: Sets m_resource to other.resource(). boolconst polymorphic_allocator< T1 > &const polymorphic_allocator< T2 > &Returns: *a.resource() == *b.resource(). boolconst polymorphic_allocator< T1 > &const polymorphic_allocator< T2 > &Returns: ! (a == b).
The members of pool_options comprise a set of constructor options for pool resources. The effect of each option on the pool resource behavior is described below: std::size_t max_blocks_per_chunk: The maximum number of blocks that will be allocated at once from the upstream memory resource to replenish a pool. If the value of max_blocks_per_chunk is zero or is greater than an implementation-defined limit, that limit is used instead. The implementation may choose to use a smaller value than is specified in this field and may use different values for different pools. std::size_t largest_required_pool_block: The largest allocation size that is required to be fulfilled using the pooling mechanism. Attempts to allocate a single block larger than this threshold will be allocated directly from the upstream memory resource. If largest_required_pool_block is zero or is greater than an implementation-defined limit, that limit is used instead. The implementation may choose a pass-through threshold larger than specified in this field. std::size_t std::size_t
boost::container::pmr::memory_resourceAn instance of resource_adaptor<Allocator> is an adaptor that wraps a memory_resource interface around Allocator. In order that resource_adaptor<X<T>> and resource_adaptor<X> are the same type for any allocator template X and types T and U, resource_adaptor<Allocator> is rendered as an alias to this class template such that Allocator is rebound to a char value type in every specialization of the class template. The requirements on this class template are defined below. In addition to the Allocator requirements, the parameter to resource_adaptor shall meet the following additional requirements: typename allocator_traits<Allocator>:: pointer shall be identical to typename allocator_traits<Allocator>:: value_type*. typename allocator_traits<Allocator>:: const_pointer shall be identical to typename allocator_traits<Allocator>:: value_type const*. typename allocator_traits<Allocator>:: void_pointer shall be identical to void*. typename allocator_traits<Allocator>:: const_void_pointer shall be identical to void const*. Allocator allocator_type &Effects: Returns m_alloc. const allocator_type &Effects: Returns m_alloc. Effects: Default constructs m_alloc. const resource_adaptor_imp &Effects: Copy constructs m_alloc. resource_adaptor_imp &&Effects: Move constructs m_alloc. const Allocator &Effects: Initializes m_alloc with a2. Allocator &&Effects: Initializes m_alloc with a2. resource_adaptor_imp &const resource_adaptor_imp &Effects: Copy assigns m_alloc. resource_adaptor_imp &resource_adaptor_imp &&Effects: Move assigns m_alloc. void *std::size_tstd::size_tReturns: Allocated memory obtained by calling m_alloc.allocate. The size and alignment of the allocated memory shall meet the requirements for a class derived from memory_resource. voidvoid *std::size_tstd::size_tRequires: p was previously allocated using A.allocate, where A == m_alloc, and not subsequently deallocated.Effects: Returns memory to the allocator using m_alloc.deallocate(). boolconst memory_resource &Let p be dynamic_cast<const resource_adaptor_imp*>(&other).Returns: false if p is null, otherwise the value of m_alloc == p->m_alloc. void *std::size_tstd::size_t voidvoid *std::size_tstd::size_t void *void * std::size_tstd::size_t std::size_t resource_adaptor<Allocator> is rendered as an alias to resource_adaptor_imp class template such that Allocator is rebound to a char value type. resource_adaptor_imp< typename allocator_traits< Allocator >::template rebind_alloc< char > > const std::size_t ::boost::container::new_allocator< T >const std::size_t std::allocator< T >const std::size_t
boost::container::pmr::memory_resourceA synchronized_pool_resource is a general-purpose memory resources having the following qualities: Each resource owns the allocated memory, and frees it on destruction, even if deallocate has not been called for some of the allocated blocks. A pool resource consists of a collection of pools, serving requests for different block sizes. Each individual pool manages a collection of chunks that are in turn divided into blocks of uniform size, returned via calls to do_allocate. Each call to do_allocate(size, alignment) is dispatched to the pool serving the smallest blocks accommodating at least size bytes. When a particular pool is exhausted, allocating a block from that pool results in the allocation of an additional chunk of memory from the upstream allocator (supplied at construction), thus replenishing the pool. With each successive replenishment, the chunk size obtained increases geometrically. [ Note: By allocating memory in chunks, the pooling strategy increases the chance that consecutive allocations will be close together in memory. - end note ] Allocation requests that exceed the largest block size of any pool are fulfilled directly from the upstream allocator. A pool_options struct may be passed to the pool resource constructors to tune the largest block size and the maximum chunk size. A synchronized_pool_resource may be accessed from multiple threads without external synchronization and may have thread-specific pools to reduce synchronization costs. voidEffects: Calls Calls upstream_resource()->deallocate() as necessary to release all allocated memory. [ Note: memory is released back to upstream_resource() even if deallocate has not been called for some of the allocated blocks. - end note ] memory_resource *Returns: The value of the upstream argument provided to the constructor of this object. pool_optionsReturns: The options that control the pooling behavior of this resource. The values in the returned struct may differ from those supplied to the pool resource constructor in that values of zero will be replaced with implementation-defined defaults and sizes may be rounded to unspecified granularity. std::size_tReturns: The number of pools that will be used in the pool resource.Note: Non-standard extension. std::size_tstd::size_tReturns: The index of the pool that will be used to serve the allocation of bytes. Returns pool_count() if bytes is bigger than options().largest_required_pool_block (no pool will be used to serve this).Note: Non-standard extension. std::size_tstd::size_tRequires: pool_idx < pool_index()Returns: The number blocks that will be allocated in the next chunk from the pool specified by pool_idx.Note: Non-standard extension. std::size_tstd::size_tRequires: pool_idx < pool_index()Returns: The number of bytes of the block that the specified pool_idx pool manages.Note: Non-standard extension. std::size_tstd::size_tRequires: pool_idx < pool_index()Returns: The number of blocks that the specified pool_idx pool has cached and will be served without calling the upstream_allocator.Note: Non-standard extension. const pool_options &memory_resource *Requires: upstream is the address of a valid memory resource.Effects: Constructs a pool resource object that will obtain memory from upstream whenever the pool resource is unable to satisfy a memory request from its own internal data structures. The resulting object will hold a copy of upstream, but will not own the resource to which upstream points. [ Note: The intention is that calls to upstream->allocate() will be substantially fewer than calls to this->allocate() in most cases. - end note The behavior of the pooling mechanism is tuned according to the value of the opts argument.Throws: Nothing unless upstream->allocate() throws. It is unspecified if or under what conditions this constructor calls upstream->allocate(). Effects: Same as unsynchronized_pool_resource(pool_options(), get_default_resource()). memory_resource *Effects: Same as unsynchronized_pool_resource(pool_options(), upstream). const pool_options &Effects: Same as unsynchronized_pool_resource(opts, get_default_resource()). const synchronized_pool_resource & synchronized_pool_resourceconst synchronized_pool_resource & Effects: Calls this->release(). void *std::size_tstd::size_tReturns: A pointer to allocated storage with a size of at least bytes. The size and alignment of the allocated memory shall meet the requirements for a class derived from memory_resource.Effects: If the pool selected for a block of size bytes is unable to satisfy the memory request from its own internal data structures, it will call upstream_resource()->allocate() to obtain more memory. If bytes is larger than that which the largest pool can handle, then memory will be allocated using upstream_resource()->allocate().Throws: Nothing unless upstream_resource()->allocate() throws. voidvoid *std::size_tstd::size_tEffects: Return the memory at p to the pool. It is unspecified if or under what circumstances this operation will result in a call to upstream_resource()->deallocate().Throws: Nothing. boolconst memory_resource &Returns: this == dynamic_cast<const unsynchronized_pool_resource*>(&other).
boost::container::pmr::memory_resourceA unsynchronized_pool_resource is a general-purpose memory resources having the following qualities: Each resource owns the allocated memory, and frees it on destruction, even if deallocate has not been called for some of the allocated blocks. A pool resource consists of a collection of pools, serving requests for different block sizes. Each individual pool manages a collection of chunks that are in turn divided into blocks of uniform size, returned via calls to do_allocate. Each call to do_allocate(size, alignment) is dispatched to the pool serving the smallest blocks accommodating at least size bytes. When a particular pool is exhausted, allocating a block from that pool results in the allocation of an additional chunk of memory from the upstream allocator (supplied at construction), thus replenishing the pool. With each successive replenishment, the chunk size obtained increases geometrically. [ Note: By allocating memory in chunks, the pooling strategy increases the chance that consecutive allocations will be close together in memory. - end note ] Allocation requests that exceed the largest block size of any pool are fulfilled directly from the upstream allocator. A pool_options struct may be passed to the pool resource constructors to tune the largest block size and the maximum chunk size. An unsynchronized_pool_resource class may not be accessed from multiple threads simultaneously and thus avoids the cost of synchronization entirely in single-threaded applications. voidEffects: Calls Calls upstream_resource()->deallocate() as necessary to release all allocated memory. [ Note: memory is released back to upstream_resource() even if deallocate has not been called for some of the allocated blocks. - end note ] memory_resource *Returns: The value of the upstream argument provided to the constructor of this object. pool_optionsReturns: The options that control the pooling behavior of this resource. The values in the returned struct may differ from those supplied to the pool resource constructor in that values of zero will be replaced with implementation-defined defaults and sizes may be rounded to unspecified granularity. std::size_tReturns: The number of pools that will be used in the pool resource.Note: Non-standard extension. std::size_tstd::size_tReturns: The index of the pool that will be used to serve the allocation of bytes. Returns pool_count() if bytes is bigger than options().largest_required_pool_block (no pool will be used to serve this).Note: Non-standard extension. std::size_tstd::size_tRequires: pool_idx < pool_index()Returns: The number blocks that will be allocated in the next chunk from the pool specified by pool_idx.Note: Non-standard extension. std::size_tstd::size_tRequires: pool_idx < pool_index()Returns: The number of bytes of the block that the specified pool_idx pool manages.Note: Non-standard extension. std::size_tstd::size_tRequires: pool_idx < pool_index()Returns: The number of blocks that the specified pool_idx pool has cached and will be served without calling the upstream_allocator.Note: Non-standard extension. const pool_options &memory_resource *Requires: upstream is the address of a valid memory resource.Effects: Constructs a pool resource object that will obtain memory from upstream whenever the pool resource is unable to satisfy a memory request from its own internal data structures. The resulting object will hold a copy of upstream, but will not own the resource to which upstream points. [ Note: The intention is that calls to upstream->allocate() will be substantially fewer than calls to this->allocate() in most cases. - end note The behavior of the pooling mechanism is tuned according to the value of the opts argument.Throws: Nothing unless upstream->allocate() throws. It is unspecified if or under what conditions this constructor calls upstream->allocate(). Effects: Same as unsynchronized_pool_resource(pool_options(), get_default_resource()). memory_resource *Effects: Same as unsynchronized_pool_resource(pool_options(), upstream). const pool_options &Effects: Same as unsynchronized_pool_resource(opts, get_default_resource()). const unsynchronized_pool_resource & unsynchronized_pool_resourceconst unsynchronized_pool_resource & Effects: Calls this->release(). void *std::size_tstd::size_tReturns: A pointer to allocated storage with a size of at least bytes. The size and alignment of the allocated memory shall meet the requirements for a class derived from memory_resource.Effects: If the pool selected for a block of size bytes is unable to satisfy the memory request from its own internal data structures, it will call upstream_resource()->allocate() to obtain more memory. If bytes is larger than that which the largest pool can handle, then memory will be allocated using upstream_resource()->allocate().Throws: Nothing unless upstream_resource()->allocate() throws. voidvoid *std::size_tstd::size_tEffects: Return the memory at p to the pool. It is unspecified if or under what circumstances this operation will result in a call to upstream_resource()->deallocate().Throws: Nothing. boolconst memory_resource &Returns: this == dynamic_cast<const unsynchronized_pool_resource*>(&other).
dtl::scoped_allocator_adaptor_base< OuterAlloc, InnerAllocs... >This class is a C++03-compatible implementation of std::scoped_allocator_adaptor. The class template scoped_allocator_adaptor is an allocator template that specifies the memory resource (the outer allocator) to be used by a container (as any other allocator does) and also specifies an inner allocator resource to be passed to the constructor of every element within the container.This adaptor is instantiated with one outer and zero or more inner allocator types. If instantiated with only one allocator type, the inner allocator becomes the scoped_allocator_adaptor itself, thus using the same allocator resource for the container and every element within the container and, if the elements themselves are containers, each of their elements recursively. If instantiated with more than one allocator, the first allocator is the outer allocator for use by the container, the second allocator is passed to the constructors of the container's elements, and, if the elements themselves are containers, the third allocator is passed to the elements' elements, and so on. If containers are nested to a depth greater than the number of allocators, the last allocator is used repeatedly, as in the single-allocator case, for any remaining recursions.[Note: The scoped_allocator_adaptor is derived from the outer allocator type so it can be substituted for the outer allocator type in most expressions. -end note]In the construct member functions, OUTERMOST(x) is x if x does not have an outer_allocator() member function and OUTERMOST(x.outer_allocator()) otherwise; OUTERMOST_ALLOC_TRAITS(x) is allocator_traits<decltype(OUTERMOST(x))>.[Note: OUTERMOST(x) and OUTERMOST_ALLOC_TRAITS(x) are recursive operations. It is incumbent upon the definition of outer_allocator() to ensure that the recursion terminates. It will terminate for all instantiations of scoped_allocator_adaptor. -end note] Type: Rebinds scoped allocator to typedef scoped_allocator_adaptor < typename outer_traits_type::template portable_rebind_alloc<U>::type , InnerAllocs... > scoped_allocator_adaptor< typename outer_traits_type::template portable_rebind_alloc< U >::type, InnerAllocs... > OuterAlloc Type: For exposition only allocator_traits< OuterAlloc > Type: scoped_allocator_adaptor<OuterAlloc> if sizeof...(InnerAllocs) is zero; otherwise, scoped_allocator_adaptor<InnerAllocs...>. base_type::inner_allocator_type allocator_traits< inner_allocator_type > outer_traits_type::value_type outer_traits_type::size_type outer_traits_type::difference_type outer_traits_type::pointer outer_traits_type::const_pointer outer_traits_type::void_pointer outer_traits_type::const_void_pointer Type: A type with a constant boolean value == true if allocator_traits<Allocator>:: propagate_on_container_copy_assignment::value is true for any Allocator in the set of OuterAlloc and InnerAllocs..., false otherwise. base_type::propagate_on_container_copy_assignment Type: A type with a constant boolean value == true if allocator_traits<Allocator>:: propagate_on_container_move_assignment::value is true for any Allocator in the set of OuterAlloc and InnerAllocs..., false otherwise. base_type::propagate_on_container_move_assignment Type: A type with a constant boolean value == true if allocator_traits<Allocator>:: propagate_on_container_swap::value is true for any Allocator in the set of OuterAlloc and InnerAllocs..., false otherwise. base_type::propagate_on_container_swap Type: A type with a constant boolean value == true if allocator_traits<Allocator>:: is_always_equal::value is true for all Allocator in the set of OuterAlloc and InnerAllocs..., false otherwise. base_type::is_always_equal voidscoped_allocator_adaptor &Effects: swaps *this with r. outer_allocator_type &Returns: static_cast<OuterAlloc&>(*this). const outer_allocator_type &Returns: static_cast<const OuterAlloc&>(*this). inner_allocator_type &Returns: *this if sizeof...(InnerAllocs) is zero; otherwise, inner. inner_allocator_type const &Returns: *this if sizeof...(InnerAllocs) is zero; otherwise, inner. size_typeReturns: allocator_traits<OuterAlloc>:: max_size(outer_allocator()). voidT *Effects: calls OUTERMOST_ALLOC_TRAITS(*this):: destroy(OUTERMOST(*this), p). pointersize_typeReturns: allocator_traits<OuterAlloc>::allocate(outer_allocator(), n). pointersize_typeconst_void_pointerReturns: allocator_traits<OuterAlloc>::allocate(outer_allocator(), n, hint). voidpointersize_typeEffects: allocator_traits<OuterAlloc>::deallocate(outer_allocator(), p, n). scoped_allocator_adaptorReturns: A new scoped_allocator_adaptor object where each allocator Allocator in the adaptor is initialized from the result of calling allocator_traits<Allocator>::select_on_container_copy_construction() on the corresponding allocator in *this. voidT *Args &&...Effects: 1) If uses_allocator<T, inner_allocator_type>::value is false calls OUTERMOST_ALLOC_TRAITS(*this):: construct(OUTERMOST(*this), p, std::forward<Args>(args)...).2) Otherwise, if uses_allocator<T, inner_allocator_type>::value is true and is_constructible<T, allocator_arg_t, inner_allocator_type, Args...>:: value is true, calls OUTERMOST_ALLOC_TRAITS(*this):: construct(OUTERMOST(*this), p, allocator_arg, inner_allocator(), std::forward<Args>(args)...).[Note: In compilers without advanced decltype SFINAE support, is_constructible can't be implemented so that condition will be replaced by constructible_with_allocator_prefix<T>::value. -end note]3) Otherwise, if uses_allocator<T, inner_allocator_type>::value is true and is_constructible<T, Args..., inner_allocator_type>:: value is true, calls OUTERMOST_ALLOC_TRAITS(*this):: construct(OUTERMOST(*this), p, std::forward<Args>(args)..., inner_allocator()).[Note: In compilers without advanced decltype SFINAE support, is_constructible can't be implemented so that condition will be replaced by constructible_with_allocator_suffix<T>:: value. -end note]4) Otherwise, the program is ill-formed.[Note: An error will result if uses_allocator evaluates to true but the specific constructor does not take an allocator. This definition prevents a silent failure to pass an inner allocator to a contained element. -end note] Effects: value-initializes the OuterAlloc base class and the inner allocator object. const scoped_allocator_adaptor &Effects: initializes each allocator within the adaptor with the corresponding allocator from other. scoped_allocator_adaptor &&Effects: move constructs each allocator within the adaptor with the corresponding allocator from other. OuterA2 &&const InnerAllocs &...Requires: OuterAlloc shall be constructible from OuterA2.Effects: initializes the OuterAlloc base class with boost::forward<OuterA2>(outerAlloc) and inner with innerAllocs...(hence recursively initializing each allocator within the adaptor with the corresponding allocator from the argument list). const scoped_allocator_adaptor< OuterA2, InnerAllocs... > &Requires: OuterAlloc shall be constructible from OuterA2.Effects: initializes each allocator within the adaptor with the corresponding allocator from other. scoped_allocator_adaptor< OuterA2, InnerAllocs... > &&Requires: OuterAlloc shall be constructible from OuterA2.Effects: initializes each allocator within the adaptor with the corresponding allocator rvalue from other. scoped_allocator_adaptor &const scoped_allocator_adaptor & scoped_allocator_adaptor &scoped_allocator_adaptor && friend voidscoped_allocator_adaptor &scoped_allocator_adaptor &Effects: swaps *this with r. boolconst scoped_allocator_adaptor< OuterA1, InnerAllocs... > &const scoped_allocator_adaptor< OuterA2, InnerAllocs... > & boolconst scoped_allocator_adaptor< OuterA1, InnerAllocs... > &const scoped_allocator_adaptor< OuterA2, InnerAllocs... > &
This header file forward declares boost::container::scoped_allocator_adaptor
A multiset is a kind of associative container that supports equivalent keys (possibly contains multiple copies of the same key value) and provides for fast retrieval of the keys themselves. Class multiset supports bidirectional iterators.A multiset satisfies all of the requirements of a container and of a reversible container, and of an associative container). multiset also provides most operations described for duplicate keys. Key Key Compare key_compare base_t::allocator_type ::boost::container::allocator_traits< allocator_type > ::boost::container::allocator_traits< allocator_type >::pointer ::boost::container::allocator_traits< allocator_type >::const_pointer ::boost::container::allocator_traits< allocator_type >::reference ::boost::container::allocator_traits< allocator_type >::const_reference ::boost::container::allocator_traits< allocator_type >::size_type ::boost::container::allocator_traits< allocator_type >::difference_type implementation_defined implementation_defined implementation_defined implementation_defined implementation_defined implementation_defined allocator_typeEffects: Returns a copy of the allocator that was passed to the object's constructor.Complexity: Constant. stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. const stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. iteratorEffects: Returns an iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant const_iteratorEffects: Returns a const_iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant. iteratorEffects: Returns an iterator to the end of the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the container.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. boolEffects: Returns true if the container contains no elements.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the number of the elements contained in the container.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the largest possible size of the container.Throws: Nothing.Complexity: Constant. iteratorArgs &&...Effects: Inserts an object of type Key constructed with std::forward<Args>(args)... and returns the iterator pointing to the newly inserted element.Complexity: Logarithmic. iteratorconst_iteratorArgs &&...Effects: Inserts an object of type Key constructed with std::forward<Args>(args)...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. iteratorconst value_type &Effects: Inserts x and returns the iterator pointing to the newly inserted element.Complexity: Logarithmic. iteratorvalue_type &&Effects: Inserts a copy of x in the container.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. iteratorconst_iteratorconst value_type &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. iteratorconst_iteratorvalue_type &&Effects: Inserts a 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. voidInputIteratorInputIteratorRequires: 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) voidstd::initializer_list< value_type >Effects: inserts each element from the range [il.begin(),il.end()) if and only if there is no element with key equivalent to the key of that element.Complexity: At most N log(size()+N) (N is the distance from il.begin() to il.end()) iteratornode_type &&Effects: Inserts a new value move-constructed from x and returns the iterator pointing to the newly inserted element.Complexity: Logarithmic. iteratorconst_iteratornode_type &&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. voidmultiset< Key, C2, Allocator, Options > &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(size() + N) (N has the value source.size()) voidmultiset< Key, C2, Allocator, Options > &&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(size() + N) (N has the value source.size()) voidset< Key, C2, Allocator, Options > &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(size() + N) (N has the value source.size()) voidset< Key, C2, Allocator, Options > &&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(size() + N) (N has the value source.size()) iteratorconst_iteratorEffects: 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_typeconst key_type &Effects: Erases all elements in the container with key equivalent to x.Returns: Returns the number of erased elements.Complexity: log(size()) + count(k) iteratorconst_iteratorconst_iteratorEffects: 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_typeconst_iteratorEffects: Removes the element pointed to by "position".Returns: A node_type owning the element, otherwise an empty node_type.Complexity: Amortized constant. node_typeconst key_type &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(size()). voidmultiset &Effects: Swaps the contents of *this and x.Throws: Nothing.Complexity: Constant. voidEffects: erase(begin(),end()).Postcondition: size() == 0.Complexity: linear in size(). key_compareEffects: Returns the comparison object out of which a was constructed.Complexity: Constant. value_compareEffects: Returns an object of value_compare constructed out of the comparison object.Complexity: Constant. iteratorconst key_type &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_iteratorconst key_type &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. iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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_iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: An iterator pointing to an element with the key equivalent to x, or end() if such an element is not found.Complexity: Logarithmic. size_typeconst key_type &Returns: The number of elements with key equivalent to x.Complexity: log(size())+count(k) size_typeconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: The number of elements with key equivalent to x.Complexity: log(size())+count(k) boolconst key_type &Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.Complexity: log(size()). boolconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.Complexity: log(size()). iteratorconst key_type &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_iteratorconst key_type &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 iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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_iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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 iteratorconst key_type &Returns: An iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic const_iteratorconst key_type &Returns: A const iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: An iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic const_iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: A const iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic std::pair< const_iterator, const_iterator >const key_type &Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic std::pair< iterator, iterator >const key_type &Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic std::pair< const_iterator, const_iterator >const K &Requires: This overload is available only if key_compare::is_transparent exists.Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic std::pair< iterator, iterator >const K &Requires: This overload is available only if key_compare::is_transparent exists.Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic voidEffects: Rebalances the tree. It's a no-op for Red-Black and AVL trees.Complexity: Linear Effects: Default constructs an empty set.Complexity: Constant. const allocator_type &Effects: Constructs an empty set using the specified allocator object.Complexity: Constant. const Compare &Effects: Constructs an empty set using the specified comparison object.Complexity: Constant. const Compare &const allocator_type &Effects: Constructs an empty set using the specified comparison object and allocator.Complexity: Constant. InputIteratorInputIteratorEffects: Constructs an empty set using and inserts elements from the range [first ,last ).Complexity: Linear in N if the range [first ,last ) is already sorted using the predicate and otherwise N logN, where N is last - first. InputIteratorInputIteratorconst allocator_type &Effects: Constructs an empty set using the specified allocator, and inserts elements from the range [first ,last ).Complexity: Linear in N if the range [first ,last ) is already sorted using the predicate and otherwise N logN, where N is last - first. InputIteratorInputIteratorconst Compare &Effects: Constructs an empty set using the specified comparison object and inserts elements from the range [first ,last ).Complexity: Linear in N if the range [first ,last ) is already sorted using the predicate and otherwise N logN, where N is last - first. InputIteratorInputIteratorconst Compare &const allocator_type &Effects: Constructs an empty set 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 the predicate and otherwise N logN, where N is last - first. ordered_range_tInputIteratorInputIteratorEffects: Constructs an empty multiset and 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. ordered_range_tInputIteratorInputIteratorconst Compare &Effects: Constructs an empty multiset using the specified comparison object 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. ordered_range_tInputIteratorInputIteratorconst Compare &const allocator_type &Effects: Constructs an empty multiset 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. ordered_range_tInputIteratorInputIteratorconst allocator_type &Effects: Constructs an empty multiset using the specified 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. std::initializer_list< value_type >Effects: Constructs an empty set and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using the predicate and otherwise N logN, where N is il.begin() - il.end(). std::initializer_list< value_type >const allocator_type &Effects: Constructs an empty set using the specified allocator, and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using the predicate and otherwise N logN, where N is il.begin() - il.end(). std::initializer_list< value_type >const Compare &Effects: Constructs an empty set using the specified comparison object and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using the predicate and otherwise N logN, where N is il.begin() - il.end(). std::initializer_list< value_type >const Compare &const allocator_type &Effects: Constructs an empty set using the specified comparison object and allocator, and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using the predicate and otherwise N logN, where N is il.begin() - il.end(). ordered_range_tstd::initializer_list< value_type >Effects: Constructs an empty set and inserts elements from the ordered unique range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be unique values.Complexity: Linear in N.Note: Non-standard extension. ordered_range_tstd::initializer_list< value_type >const Compare &Effects: Constructs an empty set using the specified comparison object and inserts elements from the ordered unique range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be unique values.Complexity: Linear in N.Note: Non-standard extension. ordered_range_tstd::initializer_list< value_type >const Compare &const allocator_type &Effects: Constructs an empty set using the specified comparison object and allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be unique values.Complexity: Linear in N.Note: Non-standard extension. const multiset &Effects: Copy constructs a set.Complexity: Linear in x.size(). multiset &&Effects: Move constructs a set. Constructs *this using x's resources.Complexity: Constant.Postcondition: x is emptied. const multiset &const allocator_type &Effects: Copy constructs a set using the specified allocator.Complexity: Linear in x.size(). multiset &&const allocator_type &Effects: Move constructs a set using the specified allocator. Constructs *this using x's resources.Complexity: Constant if a == x.get_allocator(), linear otherwise. multiset &const multiset &Effects: Makes *this a copy of x.Complexity: Linear in x.size(). multiset &multiset &&Effects: this->swap(x.get()).Throws: If allocator_traits_type::propagate_on_container_move_assignment is false and (allocation throws or value_type's move constructor throws)Complexity: Constant if allocator_traits_type:: propagate_on_container_move_assignment is true or this->get>allocator() == x.get_allocator(). Linear otherwise. multiset &std::initializer_list< value_type >Effects: Copy all elements from il to *this.Complexity: Linear in il.size(). friend boolconst multiset &const multiset &Effects: Returns true if x and y are equalComplexity: Linear to the number of elements in the container. friend boolconst multiset &const multiset &Effects: Returns true if x and y are unequalComplexity: Linear to the number of elements in the container. friend boolconst multiset &const multiset &Effects: Returns true if x is less than yComplexity: Linear to the number of elements in the container. friend boolconst multiset &const multiset &Effects: Returns true if x is greater than yComplexity: Linear to the number of elements in the container. friend boolconst multiset &const multiset &Effects: Returns true if x is equal or less than yComplexity: Linear to the number of elements in the container. friend boolconst multiset &const multiset &Effects: Returns true if x is equal or greater than yComplexity: Linear to the number of elements in the container. friend voidmultiset &multiset &Effects: x.swap(y)Complexity: Constant. A set is a kind of associative container that supports unique keys (contains at most one of each key value) and provides for fast retrieval of the keys themselves. Class set supports bidirectional iterators.A set satisfies all of the requirements of a container and of a reversible container , and of an associative container. A set also provides most operations described in for unique keys. Key Key Compare key_compare base_t::allocator_type ::boost::container::allocator_traits< allocator_type > ::boost::container::allocator_traits< allocator_type >::pointer ::boost::container::allocator_traits< allocator_type >::const_pointer ::boost::container::allocator_traits< allocator_type >::reference ::boost::container::allocator_traits< allocator_type >::const_reference ::boost::container::allocator_traits< allocator_type >::size_type ::boost::container::allocator_traits< allocator_type >::difference_type implementation_defined implementation_defined implementation_defined implementation_defined implementation_defined implementation_defined implementation_defined allocator_typeEffects: Returns a copy of the allocator that was passed to the object's constructor.Complexity: Constant. stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. const stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. iteratorEffects: Returns an iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant const_iteratorEffects: Returns a const_iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the container.Throws: Nothing.Complexity: Constant. iteratorEffects: Returns an iterator to the end of the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the container.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the container.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed container.Throws: Nothing.Complexity: Constant. boolEffects: Returns true if the container contains no elements.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the number of the elements contained in the container.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the largest possible size of the container.Throws: Nothing.Complexity: Constant. std::pair< iterator, bool >Args &&...Effects: Inserts an object x of type Key constructed with std::forward<Args>(args)... if and only if there is no element in the container with equivalent value. and returns the iterator pointing to the newly inserted element.Returns: 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.Throws: If memory allocation throws or Key's in-place constructor throws.Complexity: Logarithmic. iteratorconst_iteratorArgs &&...Effects: Inserts an object of type Key constructed with std::forward<Args>(args)... if and only if there is no element in the container with equivalent value. 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. std::pair< iterator, bool >const value_type &Effects: Inserts x if and only if there is no element in the container with key equivalent to the key of x.Returns: 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.Complexity: Logarithmic. std::pair< iterator, bool >value_type &&Effects: 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.Returns: 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.Complexity: Logarithmic. iteratorconst_iteratorconst value_type &Effects: Inserts a copy of x 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.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. iteratorconst_iteratorvalue_type &&Effects: Inserts an element 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. voidInputIteratorInputIteratorRequires: first, last are not iterators into *this.Effects: inserts each element from the range [first,last) if and only if there is no element with key equivalent to the key of that element.Complexity: At most N log(size()+N) (N is the distance from first to last) voidstd::initializer_list< value_type >Effects: inserts each element from the range [il.begin(),il.end()) if and only if there is no element with key equivalent to the key of that element.Complexity: At most N log(size()+N) (N is the distance from il.begin() to il.end()) insert_return_typenode_type &&Effects: Inserts a new value_type move constructed from the pair if and only if there is no element in the container with key equivalent to the key of x.Returns: 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.Complexity: Logarithmic. insert_return_typeconst_iteratornode_type &&Effects: 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. 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. voidset< Key, C2, Allocator, Options > &Requires: this->get_allocator() == source.get_allocator().Effects: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.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(size() + N) (N has the value source.size()) voidset< Key, C2, Allocator, Options > &&Requires: this->get_allocator() == source.get_allocator().Effects: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.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(size() + N) (N has the value source.size()) voidmultiset< Key, C2, Allocator, Options > &Requires: this->get_allocator() == source.get_allocator().Effects: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.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(size() + N) (N has the value source.size()) voidmultiset< Key, C2, Allocator, Options > &&Requires: this->get_allocator() == source.get_allocator().Effects: Attempts to extract each element in source and insert it into a using the comparison object of *this. If there is an element in a with key equivalent to the key of an element from source, then that element is not extracted from source.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(size() + N) (N has the value source.size()) iteratorconst_iteratorEffects: 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_typeconst key_type &Effects: Erases all elements in the container with key equivalent to x.Returns: Returns the number of erased elements.Complexity: log(size()) + count(k) iteratorconst_iteratorconst_iteratorEffects: 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_typeconst_iteratorEffects: Removes the element pointed to by "position".Returns: A node_type owning the element, otherwise an empty node_type.Complexity: Amortized constant. node_typeconst key_type &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(size()). voidset &Effects: Swaps the contents of *this and x.Throws: Nothing.Complexity: Constant. voidEffects: erase(begin(),end()).Postcondition: size() == 0.Complexity: linear in size(). key_compareEffects: Returns the comparison object out of which a was constructed.Complexity: Constant. value_compareEffects: Returns an object of value_compare constructed out of the comparison object.Complexity: Constant. iteratorconst key_type &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_iteratorconst key_type &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. iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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_iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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_typeconst key_type &Returns: The number of elements with key equivalent to x.Complexity: log(size())+count(k) size_typeconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: The number of elements with key equivalent to x.Complexity: log(size())+count(k) boolconst key_type &Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.Complexity: log(size()). boolconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.Complexity: log(size()). iteratorconst key_type &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_iteratorconst key_type &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 iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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_iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.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 iteratorconst key_type &Returns: An iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic const_iteratorconst key_type &Returns: A const iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: An iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic const_iteratorconst K &Requires: This overload is available only if key_compare::is_transparent exists.Returns: A const iterator pointing to the first element with key greater than x, or end() if such an element is not found.Complexity: Logarithmic std::pair< iterator, iterator >const key_type &Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic std::pair< const_iterator, const_iterator >const key_type &Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic std::pair< iterator, iterator >const K &Requires: This overload is available only if key_compare::is_transparent exists.Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic std::pair< const_iterator, const_iterator >const K &Requires: This overload is available only if key_compare::is_transparent exists.Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).Complexity: Logarithmic voidEffects: Rebalances the tree. It's a no-op for Red-Black and AVL trees.Complexity: Linear Effects: Default constructs an empty set.Complexity: Constant. const allocator_type &Effects: Constructs an empty set using the specified allocator object.Complexity: Constant. const Compare &Effects: Constructs an empty set using the specified comparison object.Complexity: Constant. const Compare &const allocator_type &Effects: Constructs an empty set using the specified comparison object and allocator.Complexity: Constant. InputIteratorInputIteratorEffects: Constructs an empty set using and inserts elements from the range [first ,last ).Complexity: Linear in N if the range [first ,last ) is already sorted using the predicate and otherwise N logN, where N is last - first. InputIteratorInputIteratorconst allocator_type &Effects: Constructs an empty set using the specified allocator, and inserts elements from the range [first ,last ).Complexity: Linear in N if the range [first ,last ) is already sorted using the predicate and otherwise N logN, where N is last - first. InputIteratorInputIteratorconst Compare &Effects: Constructs an empty set using the specified comparison object and inserts elements from the range [first ,last ).Complexity: Linear in N if the range [first ,last ) is already sorted using the predicate and otherwise N logN, where N is last - first. InputIteratorInputIteratorconst Compare &const allocator_type &Effects: Constructs an empty set 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 the predicate and otherwise N logN, where N is last - first. ordered_unique_range_tInputIteratorInputIteratorEffects: Constructs an empty set and inserts elements from the ordered unique 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 and must be unique values.Complexity: Linear in N.Note: Non-standard extension. ordered_unique_range_tInputIteratorInputIteratorconst Compare &Effects: Constructs an empty set using the specified comparison object and inserts elements from the ordered unique 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 and must be unique values.Complexity: Linear in N.Note: Non-standard extension. ordered_unique_range_tInputIteratorInputIteratorconst Compare &const allocator_type &Effects: Constructs an empty set using the specified comparison object and allocator, and inserts elements from the ordered unique 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 and must be unique values.Complexity: Linear in N.Note: Non-standard extension. ordered_unique_range_tInputIteratorInputIteratorconst allocator_type &Effects: Constructs an empty set using the specified allocator and inserts elements from the ordered unique 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 and must be unique values.Complexity: Linear in N.Note: Non-standard extension. std::initializer_list< value_type >Effects: Constructs an empty set and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using the predicate and otherwise N logN, where N is il.begin() - il.end(). std::initializer_list< value_type >const allocator_type &Effects: Constructs an empty set using the specified allocator, and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using the predicate and otherwise N logN, where N is il.begin() - il.end(). std::initializer_list< value_type >const Compare &Effects: Constructs an empty set using the specified comparison object and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using the predicate and otherwise N logN, where N is il.begin() - il.end(). std::initializer_list< value_type >const Compare &const allocator_type &Effects: Constructs an empty set using the specified comparison object and allocator, and inserts elements from the range [il.begin(), il.end()).Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using the predicate and otherwise N logN, where N is il.begin() - il.end(). ordered_unique_range_tstd::initializer_list< value_type >Effects: Constructs an empty set and inserts elements from the ordered unique range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be unique values.Complexity: Linear in N.Note: Non-standard extension. ordered_unique_range_tstd::initializer_list< value_type >const Compare &Effects: Constructs an empty set using the specified comparison object and inserts elements from the ordered unique range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be unique values.Complexity: Linear in N.Note: Non-standard extension. ordered_unique_range_tstd::initializer_list< value_type >const Compare &const allocator_type &Effects: Constructs an empty set using the specified comparison object and allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function is more efficient than the normal range creation for ordered ranges.Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be unique values.Complexity: Linear in N.Note: Non-standard extension. const set &Effects: Copy constructs a set.Complexity: Linear in x.size(). set &&Effects: Move constructs a set. Constructs *this using x's resources.Complexity: Constant.Postcondition: x is emptied. const set &const allocator_type &Effects: Copy constructs a set using the specified allocator.Complexity: Linear in x.size(). set &&const allocator_type &Effects: Move constructs a set using the specified allocator. Constructs *this using x's resources.Complexity: Constant if a == x.get_allocator(), linear otherwise. set &const set &Effects: Makes *this a copy of x.Complexity: Linear in x.size(). set &set &&Effects: this->swap(x.get()).Throws: If allocator_traits_type::propagate_on_container_move_assignment is false and (allocation throws or value_type's move constructor throws)Complexity: Constant if allocator_traits_type:: propagate_on_container_move_assignment is true or this->get>allocator() == x.get_allocator(). Linear otherwise. set &std::initializer_list< value_type >Effects: Copy all elements from il to *this.Complexity: Linear in il.size(). friend boolconst set &const set &Effects: Returns true if x and y are equalComplexity: Linear to the number of elements in the container. friend boolconst set &const set &Effects: Returns true if x and y are unequalComplexity: Linear to the number of elements in the container. friend boolconst set &const set &Effects: Returns true if x is less than yComplexity: Linear to the number of elements in the container. friend boolconst set &const set &Effects: Returns true if x is greater than yComplexity: Linear to the number of elements in the container. friend boolconst set &const set &Effects: Returns true if x is equal or less than yComplexity: Linear to the number of elements in the container. friend boolconst set &const set &Effects: Returns true if x is equal or greater than yComplexity: Linear to the number of elements in the container. friend voidset &set &Effects: x.swap(y)Complexity: Constant. InputIteratorInputIterator InputIteratorInputIteratorAllocatorOrCompare const & InputIteratorInputIteratorCompare const &Allocator const & ordered_unique_range_tInputIteratorInputIterator ordered_unique_range_tInputIteratorInputIteratorAllocatorOrCompare const & ordered_unique_range_tInputIteratorInputIteratorCompare const &Allocator const & InputIteratorInputIterator InputIteratorInputIteratorAllocatorOrCompare const & InputIteratorInputIteratorCompare const &Allocator const & ordered_range_tInputIteratorInputIterator ordered_range_tInputIteratorInputIteratorAllocatorOrCompare const & ordered_range_tInputIteratorInputIteratorCompare const &Allocator const &
A portable metafunction to obtain a multiset that uses a polymorphic allocator boost::container::multiset< Key, Compare, polymorphic_allocator< Key >, Options > A portable metafunction to obtain a set that uses a polymorphic allocator boost::container::set< Key, Compare, polymorphic_allocator< Key >, Options > boost::container::set< Key, Compare, polymorphic_allocator< Key >, Options > boost::container::multiset< Key, Compare, polymorphic_allocator< Key >, Options >
dtl::node_alloc_holder< real_allocator< T, Allocator >::type, dtl::intrusive_slist_type< real_allocator< T, Allocator >::type >::type >An slist is a singly linked list: a list where each element is linked to the next element, but not to the previous element. That is, it is a Sequence that supports forward but not backward traversal, and (amortized) constant time insertion and removal of elements. Slists, like lists, have the important property that insertion and splicing do not invalidate iterators to list elements, and that even removal invalidates only the iterators that point to the elements that are removed. The ordering of iterators may be changed (that is, slist<T>::iterator might have a different predecessor or successor after a list operation than it did before), but the iterators themselves will not be invalidated or made to point to different elements unless that invalidation or mutation is explicit.The main difference between slist and list is that list's iterators are bidirectional iterators, while slist's iterators are forward iterators. This means that slist is less versatile than list; frequently, however, bidirectional iterators are unnecessary. You should usually use slist unless you actually need the extra functionality of list, because singly linked lists are smaller and faster than double linked lists.Important performance note: like every other Sequence, slist defines the member functions insert and erase. Using these member functions carelessly, however, can result in disastrously slow programs. The problem is that insert's first argument is an iterator p, and that it inserts the new element(s) before p. This means that insert must find the iterator just before p; this is a constant-time operation for list, since list has bidirectional iterators, but for slist it must find that iterator by traversing the list from the beginning up to p. In other words: insert and erase are slow operations anywhere but near the beginning of the slist.Slist provides the member functions insert_after and erase_after, which are constant time operations: you should always use insert_after and erase_after whenever possible. If you find that insert_after and erase_after aren't adequate for your needs, and that you often need to use insert and erase in the middle of the list, then you should probably use list instead of slist. T ::boost::container::allocator_traits< ValueAllocator >::pointer ::boost::container::allocator_traits< ValueAllocator >::const_pointer ::boost::container::allocator_traits< ValueAllocator >::reference ::boost::container::allocator_traits< ValueAllocator >::const_reference ::boost::container::allocator_traits< ValueAllocator >::size_type ::boost::container::allocator_traits< ValueAllocator >::difference_type ValueAllocator implementation_defined implementation_defined implementation_defined voidsize_typeconst T &Effects: Assigns the n copies of val to *this.Throws: If memory allocation throws or T's copy constructor throws.Complexity: Linear to n. voidInpItInpItEffects: Assigns the range [first, last) to *this.Throws: If memory allocation throws or T's constructor from dereferencing InpIt throws.Complexity: Linear to n. voidstd::initializer_list< value_type >Effects: Assigns the range [il.begin(), il.end()) to *this.Throws: If memory allocation throws or T's constructor from dereferencing std::initializer_list iterator throws.Complexity: Linear to range [il.begin(), il.end()). allocator_typeEffects: Returns a copy of the internal allocator.Throws: If allocator's copy constructor throws.Complexity: Constant. stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. const stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. iteratorEffects: Returns a non-dereferenceable iterator that, when incremented, yields begin(). This iterator may be used as the argument to insert_after, erase_after, etc.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a non-dereferenceable const_iterator that, when incremented, yields begin(). This iterator may be used as the argument to insert_after, erase_after, etc.Throws: Nothing.Complexity: Constant. iteratorEffects: Returns an iterator to the first element contained in the list.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the list.Throws: Nothing.Complexity: Constant. iteratorEffects: Returns an iterator to the end of the list.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the list.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a non-dereferenceable const_iterator that, when incremented, yields begin(). This iterator may be used as the argument to insert_after, erase_after, etc.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the list.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the list.Throws: Nothing.Complexity: Constant. iteratoriteratorReturns: The iterator to the element before i in the sequence. Returns the end-iterator, if either i is the begin-iterator or the sequence is empty.Throws: Nothing.Complexity: Linear to the number of elements before i.Note: Non-standard extension. const_iteratorconst_iteratorReturns: The const_iterator to the element before i in the sequence. Returns the end-const_iterator, if either i is the begin-const_iterator or the sequence is empty.Throws: Nothing.Complexity: Linear to the number of elements before i.Note: Non-standard extension. boolEffects: Returns true if the list contains no elements.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the number of the elements contained in the list.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the largest possible size of the list.Throws: Nothing.Complexity: Constant. voidsize_typeEffects: 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 constructor throws.Complexity: Linear to the difference between size() and new_size. voidsize_typeconst T &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 constructor throws.Complexity: Linear to the difference between size() and new_size. referenceRequires: !empty()Effects: Returns a reference to the first element from the beginning of the container.Throws: Nothing.Complexity: Constant. const_referenceRequires: !empty()Effects: Returns a const reference to the first element from the beginning of the container.Throws: Nothing.Complexity: Constant. referenceArgs &&...Effects: Inserts an object of type T constructed with std::forward<Args>(args)... in the front of the listReturns: A reference to the created object.Throws: If memory allocation throws or T's copy constructor throws.Complexity: Amortized constant time. iteratorconst_iteratorArgs &&...Effects: Inserts an object of type T constructed with std::forward<Args>(args)... after prevThrows: If memory allocation throws or T's in-place constructor throws.Complexity: Constant voidconst T &Effects: Inserts a copy of x at the beginning of the list.Throws: If memory allocation throws or T's copy constructor throws.Complexity: Amortized constant time. voidT &&Effects: Constructs a new element in the beginning of the list and moves the resources of x to this new element.Throws: If memory allocation throws.Complexity: Amortized constant time. iteratorconst_iteratorconst T &Requires: p must be a valid iterator of *this.Effects: Inserts a copy of the value after prev_p.Returns: An iterator to the inserted element.Throws: If memory allocation throws or T's copy constructor throws.Complexity: Amortized constant time.Note: Does not affect the validity of iterators and references of previous values. iteratorconst_iteratorT &&Requires: prev_p must be a valid iterator of *this.Effects: Inserts a move constructed copy object from the value after the element pointed by prev_p.Returns: An iterator to the inserted element.Throws: If memory allocation throws.Complexity: Amortized constant time.Note: Does not affect the validity of iterators and references of previous values. iteratorconst_iteratorsize_typeconst value_type &Requires: prev_p must be a valid iterator of *this.Effects: Inserts n copies of x after prev_p.Returns: an iterator to the last inserted element or prev_p if n is 0.Throws: If memory allocation throws or T's copy constructor throws.Complexity: Linear to n.Note: Does not affect the validity of iterators and references of previous values. iteratorconst_iteratorInpItInpItRequires: prev_p must be a valid iterator of *this.Effects: Inserts the range pointed by [first, last) after prev_p.Returns: an iterator to the last inserted element or prev_p if first == last.Throws: If memory allocation throws, T's constructor from a dereferenced InpIt throws.Complexity: Linear to the number of elements inserted.Note: Does not affect the validity of iterators and references of previous values. iteratorconst_iteratorstd::initializer_list< value_type >Requires: prev_p must be a valid iterator of *this.Effects: Inserts the range pointed by [il.begin(), il.end()) after prev_p.Returns: an iterator to the last inserted element or prev_p if il.begin() == il.end().Throws: If memory allocation throws, T's constructor from a dereferenced std::initializer_list iterator throws.Complexity: Linear to the number of elements inserted.Note: Does not affect the validity of iterators and references of previous values. voidEffects: Removes the first element from the list.Throws: Nothing.Complexity: Amortized constant time. iteratorconst_iteratorEffects: Erases the element after the element pointed by prev_p of the list.Returns: the first element remaining beyond the removed elements, or end() if no such element exists.Throws: Nothing.Complexity: Constant.Note: Does not invalidate iterators or references to non erased elements. iteratorconst_iteratorconst_iteratorEffects: Erases the range (before_first, last) from the list.Returns: the first element remaining beyond the removed elements, or end() if no such element exists.Throws: Nothing.Complexity: Linear to the number of erased elements.Note: Does not invalidate iterators or references to non erased elements. voidslist &Effects: Swaps the contents of *this and x.Throws: Nothing.Complexity: Linear to the number of elements on *this and x. voidEffects: Erases all the elements of the list.Throws: Nothing.Complexity: Linear to the number of elements in the list. voidconst_iteratorslist &Requires: p must point to an element contained by the list. x != *thisEffects: Transfers all the elements of list x to this list, after the the element pointed by p. No destructors or copy constructors are called.Throws: std::runtime_error if this' allocator and x's allocator are not equal.Complexity: Linear to the elements in x.Note: 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. voidconst_iteratorslist &&Requires: p must point to an element contained by the list. x != *thisEffects: Transfers all the elements of list x to this list, after the the element pointed by p. No destructors or copy constructors are called.Throws: std::runtime_error if this' allocator and x's allocator are not equal.Complexity: Linear to the elements in x.Note: 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. voidconst_iteratorslist &const_iteratorRequires: 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.Effects: Transfers the value pointed by i, from list x to this list, after the element pointed by prev_p. If prev_p == prev or prev_p == ++prev, this function is a null operation.Throws: NothingComplexity: Constant.Note: 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. voidconst_iteratorslist &&const_iteratorRequires: 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.Effects: Transfers the value pointed by i, from list x to this list, after the element pointed by prev_p. If prev_p == prev or prev_p == ++prev, this function is a null operation.Throws: NothingComplexity: Constant.Note: 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. voidconst_iteratorslist &const_iteratorconst_iteratorRequires: prev_p must be a valid iterator of this. before_first and before_last must be valid iterators of x. prev_p must not be contained in [before_first, before_last) range. this' allocator and x's allocator shall compare equal.Effects: Transfers the range [before_first + 1, before_last + 1) from list x to this list, after the element pointed by prev_p.Throws: NothingComplexity: Linear to the number of transferred elements.Note: 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. voidconst_iteratorslist &&const_iteratorconst_iteratorRequires: prev_p must be a valid iterator of this. before_first and before_last must be valid iterators of x. prev_p must not be contained in [before_first, before_last) range. this' allocator and x's allocator shall compare equal.Effects: Transfers the range [before_first + 1, before_last + 1) from list x to this list, after the element pointed by prev_p.Throws: NothingComplexity: Linear to the number of transferred elements.Note: 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. voidconst_iteratorslist &const_iteratorconst_iteratorsize_typeRequires: prev_p must be a valid iterator of this. before_first and before_last must be valid iterators of x. prev_p must not be contained in [before_first, before_last) range. n == distance(before_first, before_last). this' allocator and x's allocator shall compare equal.Effects: Transfers the range [before_first + 1, before_last + 1) from list x to this list, after the element pointed by prev_p.Throws: NothingComplexity: Constant.Note: 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. voidconst_iteratorslist &&const_iteratorconst_iteratorsize_typeRequires: prev_p must be a valid iterator of this. before_first and before_last must be valid iterators of x. prev_p must not be contained in [before_first, before_last) range. n == distance(before_first, before_last). this' allocator and x's allocator shall compare equal.Effects: Transfers the range [before_first + 1, before_last + 1) from list x to this list, after the element pointed by prev_p.Throws: NothingComplexity: Constant.Note: 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. voidconst T &Effects: Removes all the elements that compare equal to value.Throws: Nothing.Complexity: Linear time. It performs exactly size() comparisons for equality.Note: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. voidPredEffects: Removes all the elements for which a specified predicate is satisfied.Throws: If pred throws.Complexity: Linear time. It performs exactly size() calls to the predicate.Note: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. voidEffects: Removes adjacent duplicate elements or adjacent elements that are equal from the list.Throws: If comparison throws.Complexity: Linear time (size()-1 comparisons equality comparisons).Note: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. voidPredEffects: Removes adjacent duplicate elements or adjacent elements that satisfy some binary predicate from the list.Throws: If pred throws.Complexity: Linear time (size()-1 comparisons calls to pred()).Note: The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. voidslist &Requires: The lists x and *this must be distinct.Effects: This function removes all of x's elements and inserts them in order into *this according to std::less<value_type>. The merge is stable; that is, if an element from *this is equivalent to one from x, then the element from *this will precede the one from x.Throws: If comparison throws.Complexity: This function is linear time: it performs at most size() + x.size() - 1 comparisons. voidslist &&Requires: The lists x and *this must be distinct.Effects: This function removes all of x's elements and inserts them in order into *this according to std::less<value_type>. The merge is stable; that is, if an element from *this is equivalent to one from x, then the element from *this will precede the one from x.Throws: If comparison throws.Complexity: This function is linear time: it performs at most size() + x.size() - 1 comparisons. voidslist &StrictWeakOrderingRequires: p must be a comparison function that induces a strict weak ordering and both *this and x must be sorted according to that ordering The lists x and *this must be distinct.Effects: This function removes all of x's elements and inserts them in order into *this. The merge is stable; that is, if an element from *this is equivalent to one from x, then the element from *this will precede the one from x.Throws: If comp throws.Complexity: This function is linear time: it performs at most size() + x.size() - 1 comparisons.Note: Iterators and references to *this are not invalidated. voidslist &&StrictWeakOrderingRequires: p must be a comparison function that induces a strict weak ordering and both *this and x must be sorted according to that ordering The lists x and *this must be distinct.Effects: This function removes all of x's elements and inserts them in order into *this. The merge is stable; that is, if an element from *this is equivalent to one from x, then the element from *this will precede the one from x.Throws: If comp throws.Complexity: This function is linear time: it performs at most size() + x.size() - 1 comparisons.Note: Iterators and references to *this are not invalidated. voidEffects: This function sorts the list *this according to std::less<value_type>. The sort is stable, that is, the relative order of equivalent elements is preserved.Throws: If comparison throws.Notes: Iterators and references are not invalidated.Complexity: The number of comparisons is approximately N log N, where N is the list's size. voidStrictWeakOrderingEffects: This function sorts the list *this according to std::less<value_type>. The sort is stable, that is, the relative order of equivalent elements is preserved.Throws: If comp throws.Notes: Iterators and references are not invalidated.Complexity: The number of comparisons is approximately N log N, where N is the list's size. voidEffects: Reverses the order of elements in the list.Throws: Nothing.Complexity: This function is linear time.Note: Iterators and references are not invalidated iteratorconst_iteratorArgs &&...Effects: Inserts an object of type T constructed with std::forward<Args>(args)... before pThrows: If memory allocation throws or T's in-place constructor throws.Complexity: Linear to the elements before p iteratorconst_iteratorconst T &Requires: p must be a valid iterator of *this.Effects: Insert a copy of x before p.Returns: an iterator to the inserted element.Throws: If memory allocation throws or x's copy constructor throws.Complexity: Linear to the elements before p. iteratorconst_iteratorT &&Requires: p must be a valid iterator of *this.Effects: Insert a new element before p with x's resources.Returns: an iterator to the inserted element.Throws: If memory allocation throws.Complexity: Linear to the elements before p. iteratorconst_iteratorsize_typeconst value_type &Requires: p must be a valid iterator of *this.Effects: Inserts n copies of x before p.Returns: an iterator to the first inserted element or p if n == 0.Throws: If memory allocation throws or T's copy constructor throws.Complexity: Linear to n plus linear to the elements before p. iteratorconst_iteratorInIterInIterRequires: p must be a valid iterator of *this.Effects: Insert a copy of the [first, last) range before p.Returns: an iterator to the first inserted element or p if first == last.Throws: If memory allocation throws, T's constructor from a dereferenced InpIt throws.Complexity: Linear to distance [first, last) plus linear to the elements before p. iteratorconst_iteratorstd::initializer_list< value_type >Requires: p must be a valid iterator of *this.Effects: Insert a copy of the [il.begin(), il.end()) range before p.Returns: an iterator to the first inserted element or p if il.begin() == il.end().Throws: If memory allocation throws, T's constructor from a dereferenced std::initializer_list iterator throws.Complexity: Linear to the range [il.begin(), il.end()) plus linear to the elements before p. iteratorconst_iteratorRequires: p must be a valid iterator of *this.Effects: Erases the element at p.Throws: Nothing.Complexity: Linear to the number of elements before p. iteratorconst_iteratorconst_iteratorRequires: first and last must be valid iterator to elements in *this.Effects: Erases the elements pointed by [first, last).Throws: Nothing.Complexity: Linear to the distance between first and last plus linear to the elements before first. voidconst_iteratorslist &Requires: p must point to an element contained by the list. x != *this. this' allocator and x's allocator shall compare equalEffects: Transfers all the elements of list x to this list, before the the element pointed by p. No destructors or copy constructors are called.Throws: NothingComplexity: Linear in distance(begin(), p), and linear in x.size().Note: 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. voidconst_iteratorslist &&Requires: p must point to an element contained by the list. x != *this. this' allocator and x's allocator shall compare equalEffects: Transfers all the elements of list x to this list, before the the element pointed by p. No destructors or copy constructors are called.Throws: NothingComplexity: Linear in distance(begin(), p), and linear in x.size().Note: 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. voidconst_iteratorslist &const_iteratorRequires: p must point to an element contained by this list. i must point to an element contained in list x. this' allocator and x's allocator shall compare equalEffects: Transfers the value pointed by i, from list x to this list, before the element pointed by p. No destructors or copy constructors are called. If p == i or p == ++i, this function is a null operation.Throws: NothingComplexity: Linear in distance(begin(), p), and in distance(x.begin(), i).Note: 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. voidconst_iteratorslist &&const_iteratorRequires: p must point to an element contained by this list. i must point to an element contained in list x. this' allocator and x's allocator shall compare equal.Effects: Transfers the value pointed by i, from list x to this list, before the element pointed by p. No destructors or copy constructors are called. If p == i or p == ++i, this function is a null operation.Throws: NothingComplexity: Linear in distance(begin(), p), and in distance(x.begin(), i).Note: 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. voidconst_iteratorslist &const_iteratorconst_iteratorRequires: p must point to an element contained by this list. first and last must point to elements contained in list x.Effects: Transfers the range pointed by first and last from list x to this list, before the element pointed by p. No destructors or copy constructors are called. this' allocator and x's allocator shall compare equal.Throws: NothingComplexity: Linear in distance(begin(), p), in distance(x.begin(), first), and in distance(first, last).Note: 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. voidconst_iteratorslist &&const_iteratorconst_iteratorRequires: p must point to an element contained by this list. first and last must point to elements contained in list x. this' allocator and x's allocator shall compare equalEffects: Transfers the range pointed by first and last from list x to this list, before the element pointed by p. No destructors or copy constructors are called.Throws: NothingComplexity: Linear in distance(begin(), p), in distance(x.begin(), first), and in distance(first, last).Note: 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. Effects: Constructs a list taking the allocator as parameter.Throws: If allocator_type's copy constructor throws.Complexity: Constant. const allocator_type &Effects: Constructs a list taking the allocator as parameter.Throws: NothingComplexity: Constant. size_typeEffects: Constructs a list and inserts n value-initialized value_types.Throws: If allocator_type's default constructor throws or T's default or copy constructor throws.Complexity: Linear to n. size_typeconst allocator_type &Effects: Constructs a list that will use a copy of allocator a and inserts n copies of value.Throws: If allocator_type's default constructor throws or T's default or copy constructor throws.Complexity: Linear to n. size_typeconst value_type &const allocator_type &allocator_type()Effects: Constructs a list that will use a copy of allocator a and inserts n copies of value.Throws: If allocator_type's default constructor throws or T's default or copy constructor throws.Complexity: Linear to n. InpItInpItconst allocator_type &allocator_type()Effects: Constructs a list that will use a copy of allocator a and inserts a copy of the range [first, last) in the list.Throws: If allocator_type's default constructor throws or T's constructor taking a dereferenced InIt throws.Complexity: Linear to the range [first, last). std::initializer_list< value_type >const allocator_type &allocator_type()Effects: Constructs a list that will use a copy of allocator a and inserts a copy of the range [il.begin(), il.end()) in the list.Throws: If allocator_type's default constructor throws or T's constructor taking a dereferenced std::initializer_list iterator throws.Complexity: Linear to the range [il.begin(), il.end()). const slist &Effects: Copy constructs a list. Postcondition: x == *this.Throws: If allocator_type's default constructorComplexity: Linear to the elements x contains. slist &&Effects: Move constructor. Moves x's resources to *this.Throws: If allocator_type's copy constructor throws.Complexity: Constant. const slist &const allocator_type &Effects: Copy constructs a list using the specified allocator.Postcondition: x == *this.Throws: If allocator_type's default constructorComplexity: Linear to the elements x contains. slist &&const allocator_type &Effects: Move constructor using the specified allocator. Moves x's resources to *this.Throws: If allocation or value_type's copy constructor throws.Complexity: Constant if a == x.get_allocator(), linear otherwise. Effects: Destroys the list. All stored values are destroyed and used memory is deallocated.Throws: Nothing.Complexity: Linear to the number of elements. slist &const slist &Effects: Makes *this contain the same elements as x.Postcondition: this->size() == x.size(). *this contains a copy of each of x's elements.Throws: If memory allocation throws or T's copy constructor throws.Complexity: Linear to the number of elements in x. slist &slist &&Effects: Makes *this contain the same elements as x.Postcondition: this->size() == x.size(). *this contains a copy of each of x's elements.Throws: If allocator_traits_type::propagate_on_container_move_assignment is false and (allocation throws or value_type's move constructor throws)Complexity: Constant if allocator_traits_type:: propagate_on_container_move_assignment is true or this->get>allocator() == x.get_allocator(). Linear otherwise. slist &std::initializer_list< value_type >Effects: Makes *this contain the same elements as in il.Postcondition: this->size() == il.size(). *this contains a copy of each of il's elements.Throws: If allocator_traits_type::propagate_on_container_move_assignment is false and (allocation throws or value_type's move constructor throws) friend boolconst slist &const slist &Effects: Returns true if x and y are equalComplexity: Linear to the number of elements in the container. friend boolconst slist &const slist &Effects: Returns true if x and y are unequalComplexity: Linear to the number of elements in the container. friend boolconst slist &const slist &Effects: Returns true if x is less than yComplexity: Linear to the number of elements in the container. friend boolconst slist &const slist &Effects: Returns true if x is greater than yComplexity: Linear to the number of elements in the container. friend boolconst slist &const slist &Effects: Returns true if x is equal or less than yComplexity: Linear to the number of elements in the container. friend boolconst slist &const slist &Effects: Returns true if x is equal or greater than yComplexity: Linear to the number of elements in the container. friend voidslist &slist &Effects: x.swap(y)Complexity: Constant. InpItInpIt InpItInpItAllocator const & boost::container::slist< TValueAllocator >A specialization of insert_iterator that works with slist Container output_iterator_tag void void void void insert_iterator< Container > & insert_iterator< Container > & insert_iterator< Container > &int Container &typename Container::iteratorboolfalse insert_iterator< Container > &const typename Container::value_type &
A portable metafunction to obtain a slist that uses a polymorphic allocator boost::container::slist< T, polymorphic_allocator< T > > boost::container::slist< T, polymorphic_allocator< T > >
boost::container::small_vector_base< T, Allocator, Options >small_vector is a vector-like container optimized for the case when it contains few elements. It contains some preallocated elements in-place, which can avoid the use of dynamic storage allocation when the actual number of elements is below that preallocated threshold.small_vector<T, N, Allocator, Options> is convertible to small_vector_base<T, Allocator, Options> that is independent from the preallocated element capacity, so client code does not need to be templated on that N argument.All boost::container::vector member functions are inherited. See vector documentation for details. voidsmall_vector & const allocator_type & size_type size_typeconst allocator_type & size_typedefault_init_t size_typedefault_init_tconst allocator_type & size_typeconst value_type & size_typeconst value_type &const allocator_type & InItInIt last InItInItconst allocator_type &a const small_vector & const small_vector &const allocator_type & const base_type & base_type && small_vector && small_vector &&const allocator_type & std::initializer_list< value_type >const allocator_type &allocator_type() small_vector &const small_vector & small_vector &small_vector && small_vector &const base_type & small_vector &base_type && allocator_traits::template portable_rebind_alloc< T >::typeA non-standard allocator used to implement small_vector. Users should never use it directly. It is described here for documentation purposes.This allocator inherits from a standard-conforming allocator and forwards member functions to the standard allocator except when internal storage is being used as memory source.This allocator is a "partially_propagable" allocator and defines is_partially_propagable as true_type.A partially propagable allocator means that not all storage allocatod by an instance of small_vector_allocator can be deallocated by another instance of this type, even if both instances compare equal or an instance is propagated to another one using the copy/move constructor or assignment. The storage that can never be propagated is identified by storage_is_unpropagable(p).boost::container::vector supports partially propagable allocators fallbacking to deep copy/swap/move operations when internal storage is being used to store vector elements.small_vector_allocator assumes that will be instantiated as boost::container::vector< T, small_vector_allocator<T, Allocator> > and internal storage can be obtained downcasting that vector to small_vector_base<T>. Obtains an small_vector_allocator that allocates objects of type T2 allocator_traits< allocator_type >::template portable_rebind_alloc< T2 >::type allocator_traits< allocator_type >::value_type allocator_traits< allocator_type >::pointer allocator_traits< allocator_type >::const_pointer allocator_traits< allocator_type >::reference allocator_traits< allocator_type >::const_reference allocator_traits< allocator_type >::size_type allocator_traits< allocator_type >::difference_type allocator_traits< allocator_type >::void_pointer allocator_traits< allocator_type >::const_void_pointer allocator_traits< allocator_type >::propagate_on_container_copy_assignment allocator_traits< allocator_type >::propagate_on_container_move_assignment allocator_traits< allocator_type >::propagate_on_container_swap An integral constant with member value == false implementation_defined An integral constant with member value == true implementation_defined pointersize_typeconst_void_pointerconst_void_pointer()Allocates storage from the standard-conforming allocator. voidpointersize_typeDeallocates previously allocated memory. Never throws size_typeReturns the maximum number of elements that could be allocated. Never throws small_vector_allocator boolpointer const small_vector_allocator &Constructor from other small_vector_allocator. Never throws small_vector_allocator &&Move constructor from small_vector_allocator. Never throws const small_vector_allocator< U, OtherVoidAllocator, OtherOptions > &Constructor from related small_vector_allocator. Never throws small_vector_allocator< U BOOST_MOVE_I OtherVoidAllocator BOOST_MOVE_I OtherOptions > &&Move constructor from related small_vector_allocator. Never throws const allocator_type &Constructor from allocator_type. Never throws small_vector_allocator &const small_vector_allocator &Assignment from other small_vector_allocator. Never throws small_vector_allocator &small_vector_allocator &&Move assignment from other small_vector_allocator. Never throws small_vector_allocator &const small_vector_allocator< U BOOST_MOVE_I OtherVoidAllocator BOOST_MOVE_I Options > &Assignment from related small_vector_allocator. Never throws small_vector_allocator &small_vector_allocator< U BOOST_MOVE_I OtherVoidAllocator BOOST_MOVE_I Options > &&Move assignment from related small_vector_allocator. Never throws small_vector_allocator &const allocator_type &Move assignment from allocator_type. Never throws friend voidsmall_vector_allocator &small_vector_allocator &Swaps two allocators, does nothing because this small_vector_allocator is stateless friend boolconst small_vector_allocator &const small_vector_allocator &An small_vector_allocator always compares to true, as memory allocated with one instance can be deallocated by another instance (except for unpropagable storage) friend boolconst small_vector_allocator &const small_vector_allocator &An small_vector_allocator always compares to false, as memory allocated with one instance can be deallocated by another instance boost::container::vector< T, A, Options >This class consists of common code from all small_vector<T, N> types that don't depend on the "N" template parameter. This class is non-copyable and non-destructible, so this class typically used as reference argument to functions that read or write small vectors. Since small_vector<T, N> derives from small_vector_base<T>, the conversion to small_vector_base is implicit //Clients can pass any small_vector<Foo, N>. void read_any_small_vector_of_foo(const small_vector_base<Foo> &in_parameter); void modify_any_small_vector_of_foo(small_vector_base<Foo> &in_out_parameter); void some_function() { small_vector<Foo, 8> myvector; read_any_small_vector_of_foo(myvector); // Reads myvector modify_any_small_vector_of_foo(myvector); // Modifies myvector } All boost::container:vector member functions are inherited. See vector documentation for details. real_allocator< T, SecondaryAllocator >::type allocator_traits< secondary_allocator_t >::template portable_rebind_alloc< void >::type dtl::get_small_vector_opt< Options >::type dtl::vector_for_small_vector< T, SecondaryAllocator, Options >::type allocator_traits< secondary_allocator_t >::pointer allocator_traits< secondary_allocator_t >::const_pointer allocator_traits< secondary_allocator_t >::void_pointer allocator_traits< secondary_allocator_t >::const_void_pointer small_vector_allocator< T, void_allocator_t, Options > dtl::aligned_storage< sizeof(T), final_alignment >::type const_pointer pointer base_type & const base_type & initial_capacity_tstd::size_t initial_capacity_tstd::size_tAllocFwd && voidsmall_vector_base & small_vector_base &const small_vector_base & small_vector_base &small_vector_base && Options voidsmall_vector_null_opt get_small_vector_opt::type< Options >get_small_vector_opt< Options >::type vector_opt< typename options_t::growth_factor_type, void > voidvoid vector< T, small_vector_allocator< T, typename allocator_traits< typename real_allocator< T, SecondaryAllocator >::type >::template portable_rebind_alloc< void >::type, Options >, typename dtl::get_vopt_from_svopt< Options >::type >
A portable metafunction to obtain a small_vector that uses a polymorphic allocator boost::container::small_vector< T, N, polymorphic_allocator< T > > boost::container::small_vector< T, N, polymorphic_allocator< T > >
Originally developed by Joaquin M. Lopez Munoz, stable_vector is a std::vector drop-in replacement implemented as a node container, offering iterator and reference stability.Here are the details taken from the author's blog (Introducing stable_vector):We present stable_vector, a fully STL-compliant stable container that provides most of the features of std::vector except element contiguity.General properties: stable_vector satisfies all the requirements of a container, a reversible container and a sequence and provides all the optional operations present in std::vector. Like std::vector, iterators are random access. stable_vector does not provide element contiguity; in exchange for this absence, the container is stable, i.e. references and iterators to an element of a stable_vector remain valid as long as the element is not erased, and an iterator that has been assigned the return value of end() always remain valid until the destruction of the associated stable_vector.Operation complexity: The big-O complexities of stable_vector operations match exactly those of std::vector. In general, insertion/deletion is constant time at the end of the sequence and linear elsewhere. Unlike std::vector, stable_vector does not internally perform any value_type destruction, copy or assignment operations other than those exactly corresponding to the insertion of new elements or deletion of stored elements, which can sometimes compensate in terms of performance for the extra burden of doing more pointer manipulation and an additional allocation per element.Exception safety: As stable_vector does not internally copy elements around, some operations provide stronger exception safety guarantees than in std::vector. T ::boost::container::allocator_traits< ValueAllocator >::pointer ::boost::container::allocator_traits< ValueAllocator >::const_pointer ::boost::container::allocator_traits< ValueAllocator >::reference ::boost::container::allocator_traits< ValueAllocator >::const_reference ::boost::container::allocator_traits< ValueAllocator >::size_type ::boost::container::allocator_traits< ValueAllocator >::difference_type ValueAllocator node_allocator_type implementation_defined implementation_defined implementation_defined implementation_defined voidsize_typeconst T &Effects: Assigns the n copies of val to *this.Throws: If memory allocation throws or T's copy constructor throws.Complexity: Linear to n. voidInputIteratorInputIteratorEffects: Assigns the the range [first, last) to *this.Throws: If memory allocation throws or T's constructor from dereferencing InpIt throws.Complexity: Linear to n. voidstd::initializer_list< value_type >Effects: Assigns the the range [il.begin(), il.end()) to *this.Throws: If memory allocation throws or T's constructor from dereferencing initializer_list iterator throws. allocator_typeEffects: Returns a copy of the internal allocator.Throws: If allocator's copy constructor throws.Complexity: Constant. const stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. iteratorEffects: Returns an iterator to the first element contained in the stable_vector.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the stable_vector.Throws: Nothing.Complexity: Constant. iteratorEffects: Returns an iterator to the end of the stable_vector.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the stable_vector.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the beginning of the reversed stable_vector.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed stable_vector.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the end of the reversed stable_vector.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed stable_vector.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the stable_vector.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the stable_vector.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed stable_vector.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed stable_vector.Throws: Nothing.Complexity: Constant. boolEffects: Returns true if the stable_vector contains no elements.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the number of the elements contained in the stable_vector.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the largest possible size of the stable_vector.Throws: Nothing.Complexity: Constant. voidsize_typeEffects: 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 value initialization throws.Complexity: Linear to the difference between size() and new_size. voidsize_typedefault_init_tEffects: 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 default initialization throws.Complexity: Linear to the difference between size() and new_size.Note: Non-standard extension voidsize_typeconst T &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 constructor throws.Complexity: Linear to the difference between size() and new_size. size_typeEffects: Number of elements for which memory has been allocated. capacity() is always greater than or equal to size().Throws: Nothing.Complexity: Constant. voidsize_typeEffects: 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. voidEffects: Tries to deallocate the excess of memory created with previous allocations. The size of the stable_vector is unchangedThrows: If memory allocation throws.Complexity: Linear to size(). referenceRequires: !empty()Effects: Returns a reference to the first element of the container.Throws: Nothing.Complexity: Constant. const_referenceRequires: !empty()Effects: Returns a const reference to the first element of the container.Throws: Nothing.Complexity: Constant. referenceRequires: !empty()Effects: Returns a reference to the last element of the container.Throws: Nothing.Complexity: Constant. const_referenceRequires: !empty()Effects: Returns a const reference to the last element of the container.Throws: Nothing.Complexity: Constant. referencesize_typeRequires: size() > n.Effects: Returns a reference to the nth element from the beginning of the container.Throws: Nothing.Complexity: Constant. const_referencesize_typeRequires: size() > n.Effects: Returns a const reference to the nth element from the beginning of the container.Throws: Nothing.Complexity: Constant. iteratorsize_typeRequires: 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_iteratorsize_typeRequires: 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_typeiteratorRequires: 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_typeconst_iteratorRequires: 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 referencesize_typeRequires: 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_referencesize_typeRequires: 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. referenceArgs &&...Effects: Inserts an object of type T constructed with std::forward<Args>(args)... in the end of the stable_vector.Returns: A reference to the created object.Throws: If memory allocation throws or the in-place constructor throws.Complexity: Amortized constant time. iteratorconst_iteratorArgs &&...Requires: p must be a valid iterator of *this.Effects: Inserts an object of type T constructed with std::forward<Args>(args)... before pThrows: If memory allocation throws or the in-place constructor throws.Complexity: If p is end(), amortized constant time Linear time otherwise. voidconst T &Effects: Inserts a copy of x at the end of the stable_vector.Throws: If memory allocation throws or T's copy constructor throws.Complexity: Amortized constant time. voidT &&Effects: Constructs a new element in the end of the stable_vector and moves the resources of x to this new element.Throws: If memory allocation throws.Complexity: Amortized constant time. iteratorconst_iteratorconst T &Requires: p must be a valid iterator of *this.Effects: Insert a copy of x before p.Returns: An iterator to the inserted element.Throws: If memory allocation throws or x's copy constructor throws.Complexity: If p is end(), amortized constant time Linear time otherwise. iteratorconst_iteratorT &&Requires: p must be a valid iterator of *this.Effects: Insert a new element before p with x's resources.Returns: an iterator to the inserted element.Throws: If memory allocation throws.Complexity: If p is end(), amortized constant time Linear time otherwise. iteratorconst_iteratorsize_typeconst T &Requires: p must be a valid iterator of *this.Effects: Insert n copies of x before p.Returns: an iterator to the first inserted element or p if n is 0.Throws: If memory allocation throws or T's copy constructor throws.Complexity: Linear to n. iteratorconst_iteratorstd::initializer_list< value_type >Requires: p must be a valid iterator of *this. Requires: p must be a valid iterator of *this.Effects: Insert a copy of the [il.begin(), il.end()) range before p.Returns: an iterator to the first inserted element or p if first == last.Complexity: Linear to distance [il.begin(), il.end()). iteratorconst_iteratorInputIteratorInputIteratorRequires: pos must be a valid iterator of *this.Effects: Insert a copy of the [first, last) range before p.Returns: an iterator to the first inserted element or p if first == last.Throws: If memory allocation throws, T's constructor from a dereferenced InpIt throws or T's copy constructor throws.Complexity: Linear to distance [first, last). voidEffects: Removes the last element from the stable_vector.Throws: Nothing.Complexity: Constant time. iteratorconst_iteratorEffects: Erases the element at p.Throws: Nothing.Complexity: Linear to the elements between p and the last element. Constant if p is the last element. iteratorconst_iteratorconst_iteratorEffects: Erases the elements pointed by [first, last).Throws: Nothing.Complexity: Linear to the distance between first and last plus linear to the elements between p and the last element. voidstable_vector &Effects: Swaps the contents of *this and x.Throws: Nothing.Complexity: Constant. voidEffects: Erases all the elements of the stable_vector.Throws: Nothing.Complexity: Linear to the number of elements in the stable_vector. Effects: Default constructs a stable_vector.Throws: If allocator_type's default constructor throws.Complexity: Constant. const allocator_type &Effects: Constructs a stable_vector taking the allocator as parameter.Throws: NothingComplexity: Constant. size_typeEffects: Constructs a stable_vector and inserts n value initialized values.Throws: If allocator_type's default constructor throws or T's default or copy constructor throws.Complexity: Linear to n. size_typedefault_init_tEffects: Constructs a stable_vector and inserts n default initialized values.Throws: If allocator_type's default constructor throws or T's default or copy constructor throws.Complexity: Linear to n.Note: Non-standard extension size_typeconst allocator_type &Effects: Constructs a stable_vector that will use a copy of allocator a and inserts n value initialized values.Throws: If allocator_type's default constructor throws or T's default or copy constructor throws.Complexity: Linear to n. size_typedefault_init_tconst allocator_type &Effects: Constructs a stable_vector that will use a copy of allocator a and inserts n default initialized values.Throws: If allocator_type's default constructor throws or T's default or copy constructor throws.Complexity: Linear to n.Note: Non-standard extension size_typeconst T &const allocator_type &allocator_type()Effects: Constructs a stable_vector that will use a copy of allocator a and inserts n copies of value.Throws: If allocator_type's default constructor throws or T's default or copy constructor throws.Complexity: Linear to n. InputIteratorInputIteratorconst allocator_type &allocator_type()Effects: Constructs a stable_vector that will use a copy of allocator a and inserts a copy of the range [first, last) in the stable_vector.Throws: If allocator_type's default constructor throws or T's constructor taking a dereferenced InIt throws.Complexity: Linear to the range [first, last). const stable_vector &Effects: Copy constructs a stable_vector.Postcondition: x == *this.Complexity: Linear to the elements x contains. std::initializer_list< value_type >const allocator_type &allocator_type()Effects: Constructs a stable_vector that will use a copy of allocator a and inserts a copy of the range [il.begin(), il.last()) in the stable_vectorThrows: If allocator_type's default constructor throws or T's constructor taking a dereferenced initializer_list iterator throws.Complexity: Linear to the range [il.begin(), il.end()). stable_vector &&Effects: Move constructor. Moves x's resources to *this.Throws: If allocator_type's copy constructor throws.Complexity: Constant. const stable_vector &const allocator_type &Effects: Copy constructs a stable_vector using the specified allocator.Postcondition: x == *this.Complexity: Linear to the elements x contains. stable_vector &&const allocator_type &Effects: Move constructor using the specified allocator. Moves x's resources to *this.Throws: If allocator_type's copy constructor throws.Complexity: Constant if a == x.get_allocator(), linear otherwise Effects: Destroys the stable_vector. All stored values are destroyed and used memory is deallocated.Throws: Nothing.Complexity: Linear to the number of elements. stable_vector &const stable_vector &Effects: Makes *this contain the same elements as x.Postcondition: this->size() == x.size(). *this contains a copy of each of x's elements.Throws: If memory allocation throws or T's copy constructor throws.Complexity: Linear to the number of elements in x. stable_vector &stable_vector &&Effects: Move assignment. All x's values are transferred to *this.Postcondition: x.empty(). *this contains a the elements x had before the function.Throws: If allocator_traits_type::propagate_on_container_move_assignment is false and (allocation throws or T's move constructor throws)Complexity: Constant if allocator_traits_type:: propagate_on_container_move_assignment is true or this->get>allocator() == x.get_allocator(). Linear otherwise. stable_vector &std::initializer_list< value_type >Effects: Make *this container contains elements from il.Complexity: Linear to the range [il.begin(), il.end()). friend boolconst stable_vector &const stable_vector &Effects: Returns true if x and y are equalComplexity: Linear to the number of elements in the container. friend boolconst stable_vector &const stable_vector &Effects: Returns true if x and y are unequalComplexity: Linear to the number of elements in the container. friend boolconst stable_vector &const stable_vector &Effects: Returns true if x is less than yComplexity: Linear to the number of elements in the container. friend boolconst stable_vector &const stable_vector &Effects: Returns true if x is greater than yComplexity: Linear to the number of elements in the container. friend boolconst stable_vector &const stable_vector &Effects: Returns true if x is equal or less than yComplexity: Linear to the number of elements in the container. friend boolconst stable_vector &const stable_vector &Effects: Returns true if x is equal or greater than yComplexity: Linear to the number of elements in the container. friend voidstable_vector &stable_vector &Effects: x.swap(y)Complexity: Constant. InputIteratorInputIterator InputIteratorInputIteratorAllocator const &
A portable metafunction to obtain a stable_vector that uses a polymorphic allocator boost::container::stable_vector< T, polymorphic_allocator< T > > boost::container::stable_vector< T, polymorphic_allocator< T > >
boost::container::vector< T, dtl::get_static_vector_allocator< T, Capacity, Options >::type >A variable-size array container with fixed capacity. static_vector is a sequence container like boost::container::vector with contiguous storage that can change in size, along with the static allocation, low overhead, and fixed capacity of boost::array.A static_vector is a sequence that supports random access to elements, constant time insertion and removal of elements at the end, and linear time insertion and removal of elements at the beginning or in the middle. The number of elements in a static_vector may vary dynamically up to a fixed capacity because elements are stored within the object itself similarly to an array. However, objects are initialized as they are inserted into static_vector unlike C arrays or std::array which must construct all elements on instantiation. The behavior of static_vector enables the use of statically allocated elements in cases with complex object lifetime requirements that would otherwise not be trivially possible.Error HandlingInsertion beyond the capacity result in throwing std::bad_alloc() if exceptions are enabled or calling throw_bad_alloc() if not enabled. std::out_of_range is thrown if out of bounds access is performed in at() if exceptions are enabled, throw_out_of_range() if not enabled. The type of elements stored in the container. base_t::value_type The unsigned integral type used by the container. base_t::size_type The pointers difference type. base_t::difference_type The pointer type. base_t::pointer The const pointer type. base_t::const_pointer The value reference type. base_t::reference The value const reference type. base_t::const_reference The iterator type. base_t::iterator The const iterator type. base_t::const_iterator The reverse iterator type. base_t::reverse_iterator The const reverse iterator. base_t::const_reverse_iterator const size_typeThe capacity/max size of the container. voidstatic_vector &The static_vector which content will be swapped with this one's content.Swaps contents of the other static_vector and this one. Throws If has_nothrow_move<T>::value is true and T's move constructor or move assignment throws, If has_nothrow_move<T>::value is false and T's copy constructor or copy assignment throws, ComplexityLinear O(N). voidstatic_vector< T, C, O > &The static_vector which content will be swapped with this one's content.Swaps contents of the other static_vector and this one. Throws If has_nothrow_move<T>::value is true and T's move constructor or move assignment throws, If has_nothrow_move<T>::value is false and T's copy constructor or copy assignment throws, ComplexityLinear O(N). other.size() <= capacity() && size() <= other.capacity() voidsize_typeThe number of elements which will be stored in the container.Inserts or erases elements at the end such that the size becomes count. New elements are value initialized. ThrowsIf T's value initialization throws. ComplexityLinear O(N). count <= capacity() voidsize_typeThe number of elements which will be stored in the container.default_init_tInserts or erases elements at the end such that the size becomes count. New elements are default initialized. ThrowsIf T's default initialization throws. ComplexityLinear O(N). NoteNon-standard extension count <= capacity() voidsize_typeThe number of elements which will be stored in the container. value_type const &The value used to copy construct the new element.Inserts or erases elements at the end such that the size becomes count. New elements are copy constructed from value. ThrowsIf T's copy constructor throws. ComplexityLinear O(N). count <= capacity() voidsize_typeThe number of elements which the container should be able to contain.This call has no effect because the Capacity of this container is constant. ThrowsNothing. ComplexityLinear O(N). count <= capacity() voidvalue_type const &The value used to copy construct the new element.Adds a copy of value at the end. ThrowsIf T's copy constructor throws. ComplexityConstant O(1). size() < capacity() voidvalue_type &&The value to move construct the new element.Moves value to the end. ThrowsIf T's move constructor throws. ComplexityConstant O(1). size() < capacity() voidDestroys last value and decreases the size. ThrowsNothing by default. ComplexityConstant O(1). !empty() iteratorconst_iteratorThe position at which the new value will be inserted. value_type const &The value used to copy construct the new element.Inserts a copy of element at p. Throws If T's copy constructor or copy assignment throws If T's move constructor or move assignment throws. ComplexityConstant or linear. p must be a valid iterator of *this in range [begin(), end()]. size() < capacity() iteratorconst_iteratorThe position at which the new value will be inserted. value_type &&The value used to move construct the new element.Inserts a move-constructed element at p. ThrowsIf T's move constructor or move assignment throws. ComplexityConstant or linear. p must be a valid iterator of *this in range [begin(), end()]. size() < capacity() iteratorconst_iteratorThe position at which new elements will be inserted. size_typeThe number of new elements which will be inserted. value_type const &The value used to copy construct new elements.Inserts a count copies of value at p. Throws If T's copy constructor or copy assignment throws. If T's move constructor or move assignment throws. ComplexityLinear O(N). p must be a valid iterator of *this in range [begin(), end()]. size() + count <= capacity() iteratorconst_iteratorThe position at which new elements will be inserted. IteratorThe iterator to the first element of a range used to construct new elements. IteratorThe iterator to the one after the last element of a range used to construct new elements.Inserts a copy of a range [first, last) at p. Throws If T's constructor and assignment taking a dereferenced Iterator. If T's move constructor or move assignment throws. ComplexityLinear O(N). p must be a valid iterator of *this in range [begin(), end()]. distance(first, last) <= capacity() Iterator must meet the ForwardTraversalIterator concept. iteratorconst_iteratorThe position at which new elements will be inserted. std::initializer_list< value_type >The std::initializer_list which contains elements that will be inserted.Inserts a copy of a range [il.begin(), il.end()) at p. Throws If T's constructor and assignment taking a dereferenced std::initializer_list iterator. ComplexityLinear O(N). p must be a valid iterator of *this in range [begin(), end()]. distance(il.begin(), il.end()) <= capacity() iteratorconst_iteratorThe position of the element which will be erased from the container.Erases T from p. ThrowsIf T's move assignment throws. ComplexityLinear O(N). p must be a valid iterator of *this in range [begin(), end()) iteratorconst_iteratorThe position of the first element of a range which will be erased from the container. const_iteratorThe position of the one after the last element of a range which will be erased from the container.Erases Values from a range [first, last). ThrowsIf T's move assignment throws. ComplexityLinear O(N). first and last must define a valid range iterators must be in range [begin(), end()] voidIteratorThe iterator to the first element of a range used to construct new content of this container. IteratorThe iterator to the one after the last element of a range used to construct new content of this container.Assigns a range [first, last) of Values to this container. ThrowsIf T's copy constructor or copy assignment throws, ComplexityLinear O(N). distance(first, last) <= capacity() voidstd::initializer_list< value_type >std::initializer_list with values used to construct new content of this container.Assigns a range [il.begin(), il.end()) of Values to this container. ThrowsIf T's copy constructor or copy assignment throws, ComplexityLinear O(N). distance(il.begin(), il.end()) <= capacity() voidsize_typeThe new number of elements which will be container in the container. value_type const &The value which will be used to copy construct the new content.Assigns a count copies of value to this container. ThrowsIf T's copy constructor or copy assignment throws. ComplexityLinear O(N). count <= capacity() referenceArgs &&...The arguments of the constructor of the new element which will be created at the end of the container.Inserts a T constructed with std::forward<Args>(args)... in the end of the container. ThrowsIf in-place constructor throws or T's move constructor throws. ComplexityConstant O(1). size() < capacity() A reference to the created object. iteratorconst_iteratorThe position at which new elements will be inserted. Args &&...The arguments of the constructor of the new element.Inserts a T constructed with std::forward<Args>(args)... before p. ThrowsIf in-place constructor throws or if T's move constructor or move assignment throws. ComplexityConstant or linear. p must be a valid iterator of *this in range [begin(), end()] size() < capacity() voidRemoves all elements from the container. ThrowsNothing. ComplexityConstant O(1). referencesize_typeThe element's index.Returns reference to the i-th element. Throwsstd::out_of_range exception by default. ComplexityConstant O(1). i < size() reference to the i-th element from the beginning of the container. const_referencesize_typeThe element's index.Returns const reference to the i-th element. Throwsstd::out_of_range exception by default. ComplexityConstant O(1). i < size() const reference to the i-th element from the beginning of the container. referencesize_typeThe element's index.Returns reference to the i-th element. ThrowsNothing by default. ComplexityConstant O(1). i < size() reference to the i-th element from the beginning of the container. const_referencesize_typeThe element's index.Returns const reference to the i-th element. ThrowsNothing by default. ComplexityConstant O(1). i < size() const reference to the i-th element from the beginning of the container. iteratorsize_typeThe element's index.Returns a iterator to the i-th element. ThrowsNothing by default. ComplexityConstant O(1). i =< size() a iterator to the i-th element. const_iteratorsize_typeThe element's index.Returns a const_iterator to the i-th element. ThrowsNothing by default. ComplexityConstant O(1). i =< size() a const_iterator to the i-th element. size_typeiteratorAn iterator to the element.Returns the index of the element pointed by p. ThrowsNothing by default. ComplexityConstant O(1). begin() <= p <= end() The index of the element pointed by p. size_typeconst_iteratorA const_iterator to the element.Returns the index of the element pointed by p. ThrowsNothing by default. ComplexityConstant O(1). begin() <= p <= end() a const_iterator to the i-th element. referenceReturns reference to the first element. ThrowsNothing by default. ComplexityConstant O(1). !empty() reference to the first element from the beginning of the container. const_referenceReturns const reference to the first element. ThrowsNothing by default. ComplexityConstant O(1). !empty() const reference to the first element from the beginning of the container. referenceReturns reference to the last element. ThrowsNothing by default. ComplexityConstant O(1). !empty() reference to the last element from the beginning of the container. const_referenceReturns const reference to the first element. ThrowsNothing by default. ComplexityConstant O(1). !empty() const reference to the last element from the beginning of the container. T *Pointer such that [data(), data() + size()) is a valid range. For a non-empty vector data() == &front(). ThrowsNothing. ComplexityConstant O(1). const T *Const pointer such that [data(), data() + size()) is a valid range. For a non-empty vector data() == &front(). ThrowsNothing. ComplexityConstant O(1). iteratorReturns iterator to the first element. ThrowsNothing. ComplexityConstant O(1). iterator to the first element contained in the vector. const_iteratorReturns const iterator to the first element. ThrowsNothing. ComplexityConstant O(1). const_iterator to the first element contained in the vector. const_iteratorReturns const iterator to the first element. ThrowsNothing. ComplexityConstant O(1). const_iterator to the first element contained in the vector. iteratorReturns iterator to the one after the last element. ThrowsNothing. ComplexityConstant O(1). iterator pointing to the one after the last element contained in the vector. const_iteratorReturns const iterator to the one after the last element. ThrowsNothing. ComplexityConstant O(1). const_iterator pointing to the one after the last element contained in the vector. const_iteratorReturns const iterator to the one after the last element. ThrowsNothing. ComplexityConstant O(1). const_iterator pointing to the one after the last element contained in the vector. reverse_iteratorReturns reverse iterator to the first element of the reversed container. ThrowsNothing. ComplexityConstant O(1). reverse_iterator pointing to the beginning of the reversed static_vector. const_reverse_iteratorReturns const reverse iterator to the first element of the reversed container. ThrowsNothing. ComplexityConstant O(1). const_reverse_iterator pointing to the beginning of the reversed static_vector. const_reverse_iteratorReturns const reverse iterator to the first element of the reversed container. ThrowsNothing. ComplexityConstant O(1). const_reverse_iterator pointing to the beginning of the reversed static_vector. reverse_iteratorReturns reverse iterator to the one after the last element of the reversed container. ThrowsNothing. ComplexityConstant O(1). reverse_iterator pointing to the one after the last element of the reversed static_vector. const_reverse_iteratorReturns const reverse iterator to the one after the last element of the reversed container. ThrowsNothing. ComplexityConstant O(1). const_reverse_iterator pointing to the one after the last element of the reversed static_vector. const_reverse_iteratorReturns const reverse iterator to the one after the last element of the reversed container. ThrowsNothing. ComplexityConstant O(1). const_reverse_iterator pointing to the one after the last element of the reversed static_vector. size_typeReturns the number of stored elements. ThrowsNothing. ComplexityConstant O(1). Number of elements contained in the container. boolQueries if the container contains elements. ThrowsNothing. ComplexityConstant O(1). true if the number of elements contained in the container is equal to 0. Constructs an empty static_vector. ThrowsNothing. ComplexityConstant O(1). size_typeThe number of values which will be contained in the container.Constructs a static_vector containing count value initialized values. ThrowsIf T's value initialization throws. ComplexityLinear O(N). count <= capacity() size_typeThe number of values which will be contained in the container.default_init_tConstructs a static_vector containing count default initialized values. ThrowsIf T's default initialization throws. ComplexityLinear O(N). NoteNon-standard extension count <= capacity() size_typeThe number of copies of a values that will be contained in the container. value_type const &The value which will be used to copy construct values.Constructs a static_vector containing count copies of value. ThrowsIf T's copy constructor throws. ComplexityLinear O(N). count <= capacity() IteratorThe iterator to the first element in range. IteratorThe iterator to the one after the last element in range.Constructs a static_vector containing copy of a range [first, last). ThrowsIf T's constructor taking a dereferenced Iterator throws. ComplexityLinear O(N). distance(first, last) <= capacity() Iterator must meet the ForwardTraversalIterator concept. std::initializer_list< value_type >std::initializer_list with values to initialize vector.Constructs a static_vector containing copy of a range [il.begin(), il.end()). ThrowsIf T's constructor taking a dereferenced std::initializer_list throws. ComplexityLinear O(N). distance(il.begin(), il.end()) <= capacity() static_vector const &The static_vector which content will be copied to this one.Constructs a copy of other static_vector. ThrowsIf T's copy constructor throws. ComplexityLinear O(N). static_vector const &const allocator_type & static_vector &&const allocator_type & const allocator_type & static_vector< T, C, O > const &The static_vector which content will be copied to this one.Constructs a copy of other static_vector. ThrowsIf T's copy constructor throws. ComplexityLinear O(N). other.size() <= capacity(). static_vector &&The static_vector which content will be moved to this one.Move constructor. Moves Values stored in the other static_vector to this one. Throws If has_nothrow_move<T>::value is true and T's move constructor throws. If has_nothrow_move<T>::value is false and T's copy constructor throws. ComplexityLinear O(N). static_vector< T, C, O > &&The static_vector which content will be moved to this one.Move constructor. Moves Values stored in the other static_vector to this one. Throws If has_nothrow_move<T>::value is true and T's move constructor throws. If has_nothrow_move<T>::value is false and T's copy constructor throws. ComplexityLinear O(N). other.size() <= capacity() static_vector &const static_vector &The static_vector which content will be copied to this one.Copy assigns Values stored in the other static_vector to this one. ThrowsIf T's copy constructor or copy assignment throws. ComplexityLinear O(N). static_vector &std::initializer_list< value_type >The std::initializer_list which content will be copied to this one.Copy assigns Values stored in std::initializer_list to *this. ThrowsIf T's copy constructor or copy assignment throws. ComplexityLinear O(N). static_vector &static_vector< T, C, O > const &The static_vector which content will be copied to this one.Copy assigns Values stored in the other static_vector to this one. ThrowsIf T's copy constructor or copy assignment throws. ComplexityLinear O(N). other.size() <= capacity() static_vector &static_vector &&The static_vector which content will be moved to this one.Move assignment. Moves Values stored in the other static_vector to this one. Throws If has_nothrow_move<T>::value is true and T's move constructor or move assignment throws. If has_nothrow_move<T>::value is false and T's copy constructor or copy assignment throws. ComplexityLinear O(N). static_vector &static_vector< T, C, O > &&The static_vector which content will be moved to this one.Move assignment. Moves Values stored in the other static_vector to this one. Throws If has_nothrow_move<T>::value is true and T's move constructor or move assignment throws. If has_nothrow_move<T>::value is false and T's copy constructor or copy assignment throws. ComplexityLinear O(N). other.size() <= capacity() Destructor. Destroys Values stored in this container. ThrowsNothing ComplexityLinear O(N). size_typeReturns container's capacity. ThrowsNothing. ComplexityConstant O(1). container's capacity. size_typeReturns container's capacity. ThrowsNothing. ComplexityConstant O(1). container's capacity. boolstatic_vector< V, C1, O1 > const &The first static_vector. static_vector< V, C2, O2 > const &The second static_vector.Checks if contents of two static_vectors are equal. ComplexityLinear O(N). true if containers have the same size and elements in both containers are equal. boolstatic_vector< V, C1, O1 > const &The first static_vector. static_vector< V, C2, O2 > const &The second static_vector.Checks if contents of two static_vectors are not equal. ComplexityLinear O(N). true if containers have different size or elements in both containers are not equal. boolstatic_vector< V, C1, O1 > const &The first static_vector. static_vector< V, C2, O2 > const &The second static_vector.Lexicographically compares static_vectors. ComplexityLinear O(N). true if x compares lexicographically less than y. boolstatic_vector< V, C1, O1 > const &The first static_vector. static_vector< V, C2, O2 > const &The second static_vector.Lexicographically compares static_vectors. ComplexityLinear O(N). true if y compares lexicographically less than x. boolstatic_vector< V, C1, O1 > const &The first static_vector. static_vector< V, C2, O2 > const &The second static_vector.Lexicographically compares static_vectors. ComplexityLinear O(N). true if y don't compare lexicographically less than x. boolstatic_vector< V, C1, O1 > const &The first static_vector. static_vector< V, C2, O2 > const &The second static_vector.Lexicographically compares static_vectors. ComplexityLinear O(N). true if x don't compare lexicographically less than y. voidstatic_vector< V, C1, O1 > &The first static_vector. static_vector< V, C2, O2 > &The second static_vector.Swaps contents of two static_vectors. This function calls static_vector::swap(). ComplexityLinear O(N).
dtl::basic_string_base< real_allocator< CharT, Allocator >::type >The basic_string class represents a Sequence of characters. It contains all the usual operations of a Sequence, and, additionally, it contains standard string operations such as search and concatenation.The basic_string class is parameterized by character type, and by that type's Character Traits.This class has performance characteristics very much like vector<>, meaning, for example, that it does not perform reference-count or copy-on-write, and that concatenation of two strings is an O(N) operation.Some of basic_string's member functions use an unusual method of specifying positions and ranges. In addition to the conventional method using iterators, many of basic_string's member functions use a single value pos of type size_type to represent a position (in which case the position is begin() + pos, and many of basic_string's member functions use two values, pos and n, to represent a range. In that case pos is the beginning of the range and n is its size. That is, the range is [begin() + pos, begin() + pos + n).Note that the C++ standard does not specify the complexity of basic_string operations. In this implementation, basic_string has performance characteristics very similar to those of vector: access to a single character is O(1), while copy and concatenation are O(N).In this implementation, begin(), end(), rbegin(), rend(), operator[], c_str(), and data() do not invalidate iterators. In this implementation, iterators are only invalidated by member functions that explicitly change the string's contents. Traits CharT real_allocator< CharT, Allocator >::type ::boost::container::allocator_traits< allocator_type >::pointer ::boost::container::allocator_traits< allocator_type >::const_pointer ::boost::container::allocator_traits< allocator_type >::reference ::boost::container::allocator_traits< allocator_type >::const_reference ::boost::container::allocator_traits< allocator_type >::size_type ::boost::container::allocator_traits< allocator_type >::difference_type implementation_defined implementation_defined implementation_defined implementation_defined implementation_defined const size_type allocator_typeEffects: Returns a copy of the internal allocator.Throws: If allocator's copy constructor throws.Complexity: Constant. stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. const stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. iteratorEffects: Returns an iterator to the first element contained in the vector.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the vector.Throws: Nothing.Complexity: Constant. iteratorEffects: Returns an iterator to the end of the vector.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the vector.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the beginning of the reversed vector.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed vector.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the end of the reversed vector.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed vector.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the vector.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the vector.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed vector.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed vector.Throws: Nothing.Complexity: Constant. boolEffects: Returns true if the vector contains no elements.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the number of the elements contained in the vector.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the number of the elements contained in the vector.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the largest possible size of the vector.Throws: Nothing.Complexity: Constant. voidsize_typeCharTEffects: Inserts or erases elements at the end such that the size becomes n. New elements are copy constructed from x.Throws: If memory allocation throwsComplexity: Linear to the difference between size() and new_size. voidsize_typeEffects: Inserts or erases elements at the end such that the size becomes n. New elements are value initialized.Throws: If memory allocation throwsComplexity: Linear to the difference between size() and new_size. voidsize_typedefault_init_tEffects: Inserts or erases elements at the end such that the size becomes n. New elements are uninitialized.Throws: If memory allocation throwsComplexity: Linear to the difference between size() and new_size.Note: Non-standard extension size_typeEffects: Number of elements for which memory has been allocated. capacity() is always greater than or equal to size().Throws: Nothing.Complexity: Constant. voidsize_typeEffects: 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 voidEffects: Tries to deallocate the excess of memory created with previous allocations. The size of the string is unchangedThrows: NothingComplexity: Linear to size(). referenceRequires: !empty()Effects: Returns a reference to the first element of the container.Throws: Nothing.Complexity: Constant. const_referenceRequires: !empty()Effects: Returns a const reference to the first element of the container.Throws: Nothing.Complexity: Constant. referenceRequires: !empty()Effects: Returns a reference to the last element of the container.Throws: Nothing.Complexity: Constant. const_referenceRequires: !empty()Effects: Returns a const reference to the last element of the container.Throws: Nothing.Complexity: Constant. referencesize_typeRequires: size() > n.Effects: Returns a reference to the nth element from the beginning of the container.Throws: Nothing.Complexity: Constant. const_referencesize_typeRequires: size() > n.Effects: Returns a const reference to the nth element from the beginning of the container.Throws: Nothing.Complexity: Constant. referencesize_typeRequires: 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_referencesize_typeRequires: 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. basic_string &const basic_string &Effects: Calls append(str.data, str.size()).Returns: *this basic_string &BasicStringView< CharT, Traits >Effects: Same as return append(sv). basic_string &const CharT *Effects: Calls append(s).Returns: *this basic_string &CharTEffects: Calls append(1, c).Returns: *this basic_string &std::initializer_list< CharT >Effects: Returns append(il) basic_string &const basic_string &Effects: Calls append(str.data(), str.size()).Returns: *this basic_string &BasicStringView< CharT, Traits >Effects: Same as return append(sv.data(), sv.size()). basic_string &const basic_string &size_typesize_typenposRequires: pos <= str.size()Effects: Determines the effective length rlen of the string to append as the smaller of n and str.size() - pos and calls append(str.data() + pos, rlen).Throws: If memory allocation throws and out_of_range if pos > str.size()Returns: *this basic_string &const CharT *size_typeRequires: s points to an array of at least n elements of CharT.Effects: The function replaces the string controlled by *this with a string of length size() + n whose irst size() elements are a copy of the original string controlled by *this and whose remaining elements are a copy of the initial n elements of s.Throws: If memory allocation throws length_error if size() + n > max_size().Returns: *this basic_string &const CharT *Requires: s points to an array of at least traits::length(s) + 1 elements of CharT.Effects: Calls append(s, traits::length(s)).Returns: *this basic_string &size_typeCharTEffects: Equivalent to append(basic_string(n, c)).Returns: *this basic_string &InputIterInputIterRequires: [first,last) is a valid range.Effects: Equivalent to append(basic_string(first, last)).Returns: *this basic_string &std::initializer_list< CharT >Effects: Returns append(il.begin(), il.size()). voidCharTEffects: Equivalent to append(static_cast<size_type>(1), c). basic_string &const basic_string &Effects: Equivalent to assign(str, 0, npos).Returns: *this basic_string &BasicStringView< CharT, Traits >Effects: Equivalent to return assign(sv.data(), sv.size()).Returns: *this basic_string &basic_string &&Effects: The function replaces the string controlled by *this with a string of length str.size() whose elements are a copy of the string controlled by str. Leaves str in a valid but unspecified state.Throws: NothingReturns: *this basic_string &const basic_string &size_typesize_typeRequires: pos <= str.size()Effects: Determines the effective length rlen of the string to assign as the smaller of n and str.size() - pos and calls assign(str.data() + pos rlen).Throws: If memory allocation throws or out_of_range if pos > str.size().Returns: *this basic_string &const CharT *size_typeRequires: s points to an array of at least n elements of CharT.Effects: Replaces the string controlled by *this with a string of length n whose elements are a copy of those pointed to by s.Throws: If memory allocation throws or length_error if n > max_size().Returns: *this basic_string &const CharT *Requires: s points to an array of at least traits::length(s) + 1 elements of CharT.Effects: Calls assign(s, traits::length(s)).Returns: *this basic_string &size_typeCharTEffects: Equivalent to assign(basic_string(n, c)).Returns: *this basic_string &const CharT *const CharT *Effects: Equivalent to assign(basic_string(first, last)). Returns: *this basic_string &InputIterInputIterEffects: Equivalent to assign(basic_string(first, last)).Returns: *this basic_string &std::initializer_list< CharT >Effects: Returns assign(il.begin(), il.size()). basic_string &size_typeconst basic_string &Requires: pos <= size().Effects: Calls insert(pos, str.data(), str.size()).Throws: If memory allocation throws or out_of_range if pos > size().Returns: *this basic_string &size_typeconst basic_string &size_typesize_typenposRequires: pos1 <= size() and pos2 <= str.size()Effects: Determines the effective length rlen of the string to insert as the smaller of n and str.size() - pos2 and calls insert(pos1, str.data() + pos2, rlen).Throws: If memory allocation throws or out_of_range if pos1 > size() or pos2 > str.size().Returns: *this basic_string &size_typeconst CharT *size_typeRequires: s points to an array of at least n elements of CharT and pos <= size().Effects: Replaces the string controlled by *this with a string of length size() + n whose first pos elements are a copy of the initial elements of the original string controlled by *this and whose next n elements are a copy of the elements in s and whose remaining elements are a copy of the remaining elements of the original string controlled by *this.Throws: If memory allocation throws, out_of_range if pos > size() or length_error if size() + n > max_size().Returns: *this basic_string &size_typeconst CharT *Requires: pos <= size() and s points to an array of at least traits::length(s) + 1 elements of CharTEffects: Calls insert(pos, s, traits::length(s)).Throws: If memory allocation throws, out_of_range if pos > size() length_error if size() > max_size() - Traits::length(s)Returns: *this basic_string &size_typesize_typeCharTEffects: Equivalent to insert(pos, basic_string(n, c)).Throws: If memory allocation throws, out_of_range if pos > size() length_error if size() > max_size() - nReturns: *this basic_string &size_typeBasicStringView< CharT, Traits >Effects: Same as return insert(pos, sv.data(), sv.size()). iteratorconst_iteratorCharTRequires: p is a valid iterator on *this.Effects: inserts a copy of c before the character referred to by p.Returns: An iterator which refers to the copy of the inserted character. iteratorconst_iteratorsize_typeCharTRequires: p is a valid iterator on *this.Effects: Inserts n copies of c before the character referred to by p.Returns: an iterator to the first inserted element or p if n is 0. iteratorconst_iteratorInputIterInputIterRequires: p is a valid iterator on *this. [first,last) is a valid range.Effects: Equivalent to insert(p - begin(), basic_string(first, last)).Returns: an iterator to the first inserted element or p if first == last. iteratorconst_iteratorstd::initializer_list< CharT >Effects: As if by insert(p, il.begin(), il.end()).Returns: An iterator which refers to the copy of the first inserted character, or p if i1 is empty. voidEffects: Removes the last element from the container.Throws: Nothing.Complexity: Constant time. basic_string &size_type0size_typenposRequires: pos <= size()Effects: Determines the effective length xlen of the string to be removed as the smaller of n and size() - pos. The function then replaces the string controlled by *this with a string of length size() - xlen whose first pos elements are a copy of the initial elements of the original string controlled by *this, and whose remaining elements are a copy of the elements of the original string controlled by *this beginning at position pos + xlen.Throws: out_of_range if pos > size().Returns: *this iteratorconst_iteratorEffects: Removes the character referred to by p.Throws: NothingReturns: An iterator which points to the element immediately following p prior to the element being erased. If no such element exists, end() is returned. iteratorconst_iteratorconst_iteratorRequires: first and last are valid iterators on *this, defining a range [first,last).Effects: Removes the characters in the range [first,last).Throws: NothingReturns: An iterator which points to the element pointed to by last prior to the other elements being erased. If no such element exists, end() is returned. voidEffects: Erases all the elements of the vector.Throws: Nothing.Complexity: Linear to the number of elements in the vector. basic_string &size_typesize_typeconst basic_string &Requires: pos1 <= size().Effects: Calls replace(pos1, n1, str.data(), str.size()).Throws: if memory allocation throws or out_of_range if pos1 > size().Returns: *this basic_string &size_typesize_typeBasicStringView< CharT, Traits >Effects: Calls return replace(pos1, n1, sv.data(), sv.size());. basic_string &size_typesize_typeconst basic_string &size_typesize_typenposRequires: pos1 <= size() and pos2 <= str.size().Effects: Determines the effective length rlen of the string to be inserted as the smaller of n2 and str.size() - pos2 and calls replace(pos1, n1, str.data() + pos2, rlen).Throws: if memory allocation throws, out_of_range if pos1 > size() or pos2 > str.size().Returns: *this basic_string &size_typesize_typeBasicStringView< CharT, Traits >size_typesize_typenposThrows: out_of_range if pos1 > size() or pos2 > sv.size().Effects: Determines the effective length rlen of the string to be inserted as the smaller of n2 and sv.size() - pos2 and calls replace(pos1, n1, sv.data() + pos2, rlen).Returns: *this. basic_string &size_typesize_typeconst CharT *size_typeRequires: pos1 <= size() and s points to an array of at least n2 elements of CharT.Effects: Determines the effective length xlen of the string to be removed as the smaller of n1 and size() - pos1. If size() - xlen >= max_size() - n2 throws length_error. Otherwise, the function replaces the string controlled by *this with a string of length size() - xlen + n2 whose first pos1 elements are a copy of the initial elements of the original string controlled by *this, whose next n2 elements are a copy of the initial n2 elements of s, and whose remaining elements are a copy of the elements of the original string controlled by *this beginning at position pos + xlen.Throws: if memory allocation throws, out_of_range if pos1 > size() or length_error if the length of the resulting string would exceed max_size()Returns: *this basic_string &size_typesize_typeconst CharT *Requires: pos1 <= size() and s points to an array of at least n2 elements of CharT.Effects: Determines the effective length xlen of the string to be removed as the smaller of n1 and size() - pos1. If size() - xlen >= max_size() - n2 throws length_error. Otherwise, the function replaces the string controlled by *this with a string of length size() - xlen + n2 whose first pos1 elements are a copy of the initial elements of the original string controlled by *this, whose next n2 elements are a copy of the initial n2 elements of s, and whose remaining elements are a copy of the elements of the original string controlled by *this beginning at position pos + xlen.Throws: if memory allocation throws, out_of_range if pos1 > size() or length_error if the length of the resulting string would exceed max_size()Returns: *this basic_string &size_typesize_typesize_typeCharTRequires: pos1 <= size().Effects: Equivalent to replace(pos1, n1, basic_string(n2, c)).Throws: if memory allocation throws, out_of_range if pos1 > size() or length_error if the length of the resulting string would exceed max_size()Returns: *this basic_string &const_iteratorconst_iteratorconst basic_string &Requires: [begin(),i1) and [i1,i2) are valid ranges.Effects: Calls replace(i1 - begin(), i2 - i1, str).Throws: if memory allocation throwsReturns: *this basic_string &const_iteratorconst_iteratorconst CharT *size_typeRequires: [begin(),i1) and [i1,i2) are valid ranges and s points to an array of at least n elementsEffects: Calls replace(i1 - begin(), i2 - i1, s, n).Throws: if memory allocation throwsReturns: *this basic_string &const_iteratorconst_iteratorconst CharT *Requires: [begin(),i1) and [i1,i2) are valid ranges and s points to an array of at least traits::length(s) + 1 elements of CharT.Effects: Calls replace(i1 - begin(), i2 - i1, s, traits::length(s)).Throws: if memory allocation throwsReturns: *this basic_string &const_iteratorconst_iteratorsize_typeCharTRequires: [begin(),i1) and [i1,i2) are valid ranges.Effects: Calls replace(i1 - begin(), i2 - i1, basic_string(n, c)).Throws: if memory allocation throwsReturns: *this basic_string &const_iteratorconst_iteratorInputIterInputIterRequires: [begin(),i1), [i1,i2) and [j1,j2) are valid ranges.Effects: Calls replace(i1 - begin(), i2 - i1, basic_string(j1, j2)).Throws: if memory allocation throwsReturns: *this basic_string &const_iteratorconst_iteratorBasicStringView< CharT, Traits >Requires: [begin(), i1) and [i1, i2) are valid ranges.Effects: Calls replace(i1 - begin(), i2 - i1, sv)..Returns: *this. basic_string &const_iteratorconst_iteratorstd::initializer_list< CharT >Requires: [begin(), i1) and [i1, i2) are valid ranges.Effects: Calls replace(i1 - begin(), i2 - i1, il.begin(), il.size()).Returns: *this. size_typeCharT *size_typesize_type0Requires: pos <= size()Effects: Determines the effective length rlen of the string to copy as the smaller of n and size() - pos. s shall designate an array of at least rlen elements. The function then replaces the string designated by s with a string of length rlen whose elements are a copy of the string controlled by *this beginning at position pos. The function does not append a null object to the string designated by s.Throws: if memory allocation throws, out_of_range if pos > size().Returns: rlen voidbasic_string &Effects: *this contains the same sequence of characters that was in s, s contains the same sequence of characters that was in *this.Throws: Nothing const CharT *Requires: The program shall not alter any of the values stored in the character array.Returns: A pointer p such that p + i == &operator[](i) for each i in [0,size()].Complexity: constant time. const CharT *Requires: The program shall not alter any of the values stored in the character array.Returns: A pointer p such that p + i == &operator[](i) for each i in [0,size()].Complexity: constant time. CharT *Returns: A pointer p such that p + i == &operator[](i) for each i in [0,size()].Complexity: constant time. BasicStringView< CharT, Traits >Returns: a string_view to the characters in the string.Complexity: constant time. BasicStringViewReturns: a string_view to the characters in the string.Complexity: constant time.Note: This function is available to write portable code for compilers that don't support templated conversion operators. size_typeconst basic_string &size_type0Effects: Determines the lowest position xpos, if possible, such that both of the following conditions hold: 1) pos <= xpos and xpos + str.size() <= size(); 2) traits::eq(at(xpos+I), str.at(I)) for all elements I of the string controlled by str.Throws: NothingReturns: xpos if the function can determine such a value for xpos. Otherwise, returns npos. size_typeBasicStringView< CharT, Traits >size_type0Effects: Determines the lowest position xpos, if possible, such that both of the following conditions hold: 1) pos <= xpos and xpos + sv.size() <= size(); 2) traits::eq(at(xpos+I), sv.at(I)) for all elements I of the string controlled by sv.Throws: NothingReturns: xpos if the function can determine such a value for xpos. Otherwise, returns npos. size_typeconst CharT *size_typesize_typeRequires: s points to an array of at least n elements of CharT.Throws: NothingReturns: find(basic_string<CharT,traits,allocator_type>(s,n),pos). size_typeconst CharT *size_type0Requires: s points to an array of at least traits::length(s) + 1 elements of CharT.Throws: NothingReturns: find(basic_string(s), pos). size_typeCharTsize_type0Throws: NothingReturns: find(basic_string<CharT,traits,allocator_type>(1,c), pos). size_typeconst basic_string &size_typenposEffects: Determines the highest position xpos, if possible, such that both of the following conditions obtain: a) xpos <= pos and xpos + str.size() <= size(); b) traits::eq(at(xpos+I), str.at(I)) for all elements I of the string controlled by str.Throws: NothingReturns: xpos if the function can determine such a value for xpos. Otherwise, returns npos. size_typeBasicStringView< CharT, Traits >size_typenposEffects: Determines the highest position xpos, if possible, such that both of the following conditions obtain: a) xpos <= pos and xpos + sv.size() <= size(); b) traits::eq(at(xpos+I), sv.at(I)) for all elements I of the string controlled by sv.Throws: NothingReturns: xpos if the function can determine such a value for xpos. Otherwise, returns npos. size_typeconst CharT *size_typesize_typeRequires: s points to an array of at least n elements of CharT.Throws: NothingReturns: rfind(basic_string(s, n), pos). size_typeconst CharT *size_typenposRequires: pos <= size() and s points to an array of at least traits::length(s) + 1 elements of CharT.Throws: NothingReturns: rfind(basic_string(s), pos). size_typeCharTsize_typenposThrows: NothingReturns: rfind(basic_string<CharT,traits,allocator_type>(1,c),pos). size_typeconst basic_string &size_type0Effects: Determines the lowest position xpos, if possible, such that both of the following conditions obtain: a) pos <= xpos and xpos < size(); b) traits::eq(at(xpos), str.at(I)) for some element I of the string controlled by str.Throws: NothingReturns: xpos if the function can determine such a value for xpos. Otherwise, returns npos. size_typeBasicStringView< CharT, Traits >size_type0Effects: Determines the lowest position xpos, if possible, such that both of the following conditions obtain: a) pos <= xpos and xpos < size(); b) traits::eq(at(xpos), sv.at(I)) for some element I of the string controlled by sv.Throws: NothingReturns: xpos if the function can determine such a value for xpos. Otherwise, returns npos. size_typeconst CharT *size_typesize_typeRequires: s points to an array of at least n elements of CharT.Throws: NothingReturns: find_first_of(basic_string(s, n), pos). size_typeconst CharT *size_type0Requires: s points to an array of at least traits::length(s) + 1 elements of CharT.Throws: NothingReturns: find_first_of(basic_string(s), pos). size_typeCharTsize_type0Requires: s points to an array of at least traits::length(s) + 1 elements of CharT.Throws: NothingReturns: find_first_of(basic_string<CharT,traits,allocator_type>(1,c), pos). size_typeconst basic_string &size_typenposEffects: Determines the highest position xpos, if possible, such that both of the following conditions obtain: a) xpos <= pos and xpos < size(); b) traits::eq(at(xpos), str.at(I)) for some element I of the string controlled by str.Throws: NothingReturns: xpos if the function can determine such a value for xpos. Otherwise, returns npos. size_typeBasicStringView< CharT, Traits >size_typenposEffects: Determines the highest position xpos, if possible, such that both of the following conditions obtain: a) xpos <= pos and xpos < size(); b) traits::eq(at(xpos), str.at(I)) for some element I of the string controlled by str.Throws: NothingReturns: xpos if the function can determine such a value for xpos. Otherwise, returns npos. size_typeconst CharT *size_typesize_typeRequires: s points to an array of at least n elements of CharT.Throws: NothingReturns: find_last_of(basic_string(s, n), pos). size_typeconst CharT *size_typenposRequires: s points to an array of at least traits::length(s) + 1 elements of CharT.Throws: NothingReturns: find_last_of(basic_string<CharT,traits,allocator_type>(1,c),pos). size_typeCharTsize_typenposThrows: NothingReturns: find_last_of(basic_string(s), pos). size_typeconst basic_string &size_type0Effects: Determines the lowest position xpos, if possible, such that both of the following conditions obtain: a) pos <= xpos and xpos < size(); b) traits::eq(at(xpos), str.at(I)) for no element I of the string controlled by str.Throws: NothingReturns: xpos if the function can determine such a value for xpos. Otherwise, returns npos. size_typeBasicStringView< CharT, Traits >size_type0Effects: Determines the lowest position xpos, if possible, such that both of the following conditions obtain: a) pos <= xpos and xpos < size(); b) traits::eq(at(xpos), sv.at(I)) for no element I of the string controlled by sv.Throws: NothingReturns: xpos if the function can determine such a value for xpos. Otherwise, returns npos. size_typeconst CharT *size_typesize_typeRequires: s points to an array of at least traits::length(s) + 1 elements of CharT.Throws: NothingReturns: find_first_not_of(basic_string(s, n), pos). size_typeconst CharT *size_type0Requires: s points to an array of at least traits::length(s) + 1 elements of CharT.Throws: NothingReturns: find_first_not_of(basic_string(s), pos). size_typeCharTsize_type0Throws: NothingReturns: find_first_not_of(basic_string(1, c), pos). size_typeconst basic_string &size_typenposEffects: Determines the highest position xpos, if possible, such that both of the following conditions obtain: a) xpos <= pos and xpos < size(); b) traits::eq(at(xpos), str.at(I)) for no element I of the string controlled by str.Throws: NothingReturns: xpos if the function can determine such a value for xpos. Otherwise, returns npos. size_typeBasicStringView< CharT, Traits >size_typenposEffects: Determines the highest position xpos, if possible, such that both of the following conditions obtain: a) xpos <= pos and xpos < size(); b) traits::eq(at(xpos), sv.at(I)) for no element I of the string controlled by sv.Throws: NothingReturns: xpos if the function can determine such a value for xpos. Otherwise, returns npos. size_typeconst CharT *size_typesize_typeRequires: s points to an array of at least n elements of CharT.Throws: NothingReturns: find_last_not_of(basic_string(s, n), pos). size_typeconst CharT *size_typenposRequires: s points to an array of at least traits::length(s) + 1 elements of CharT.Throws: NothingReturns: find_last_not_of(basic_string(s), pos). size_typeCharTsize_typenposThrows: NothingReturns: find_last_not_of(basic_string(1, c), pos). basic_stringsize_type0size_typenposRequires: Requires: pos <= size()Effects: Determines the effective length rlen of the string to copy as the smaller of n and size() - pos.Throws: If memory allocation throws or out_of_range if pos > size().Returns: basic_string<CharT,traits,allocator_type>(data()+pos,rlen). intconst basic_string &Effects: Determines the effective length rlen of the string to compare as the smaller of size() and str.size(). The function then compares the two strings by calling traits::compare(data(), str.data(), rlen).Throws: NothingReturns: The nonzero result if the result of the comparison is nonzero. Otherwise, returns a value < 0 if size() < str.size(), a 0 value if size() == str.size(), and value > 0 if size() > str.size() intBasicStringView< CharT, Traits >Throws: NothingReturns: compare(basic_string(sv)). intsize_typesize_typeconst basic_string &Requires: pos1 <= size()Effects: Determines the effective length rlen of the string to compare as the smaller of (this->size() - pos1), n1 and str.size(). The function then compares the two strings by calling traits::compare(data()+pos1, str.data(), rlen).Throws: out_of_range if pos1 > size()Returns:basic_string(*this,pos1,n1).compare(str). intsize_typesize_typeBasicStringView< CharT, Traits >Requires: pos1 <= size()Throws: out_of_range if pos1 > size()Returns:basic_string(*this,pos1,n1).compare(sv). intsize_typesize_typeconst basic_string &size_typesize_typenposRequires: pos1 <= size() and pos2 <= str.size()Effects: Determines the effective length rlen of the string to copy as the smaller ofThrows: out_of_range if pos1 > size() or pos2 > str.size()Returns: basic_string(*this, pos1, n1).compare(basic_string(str, pos2, n2)). intsize_typesize_typeBasicStringView< CharT, Traits >size_typesize_typeRequires: pos1 <= size() and pos2 <= str.size()Effects: Determines the effective length rlen of the string to copy as the smaller ofThrows: out_of_range if pos1 > size() or pos2 > sv.size()Returns: basic_string(*this, pos1, n1).compare(BasicStringView<CharT, Traits>(sv, pos2, n2)). intconst CharT *Throws: NothingReturns: compare(basic_string(s)). intsize_typesize_typeconst CharT *size_typeRequires: pos1 > size() and s points to an array of at least n2 elements of CharT.Throws: out_of_range if pos1 > size()Returns: basic_string(*this, pos, n1).compare(basic_string(s, n2)). intsize_typesize_typeconst CharT *Requires: pos1 > size() and s points to an array of at least traits::length(s) + 1 elements of CharT.Throws: out_of_range if pos1 > size()Returns: basic_string(*this, pos, n1).compare(basic_string(s, n2)). Effects: Default constructs a basic_string.Throws: If allocator_type's default constructor throws. const allocator_type &Effects: Constructs a basic_string taking the allocator as parameter.Throws: Nothing const basic_string &Effects: Copy constructs a basic_string.Postcondition: x == *this.Throws: If allocator_type's default constructor or allocation throws. BasicStringView< CharT, Traits >const allocator_type &allocator_type()Effects: Same as basic_string(sv.data(), sv.size(), a).Throws: If allocator_type's default constructor or allocation throws. basic_string &&Effects: Move constructor. Moves s's resources to *this.Throws: Nothing.Complexity: Constant. const basic_string &const allocator_type &Effects: Copy constructs a basic_string using the specified allocator.Postcondition: x == *this.Throws: If allocation throws. basic_string &&const allocator_type &Effects: Move constructor using the specified allocator. Moves s's resources to *this.Throws: If allocation throws.Complexity: Constant if a == s.get_allocator(), linear otherwise. const basic_string &size_typesize_typenposEffects: Constructs a basic_string with a default-constructed allocator, and is initialized by a specific number of characters of the s string. const basic_string &size_typesize_typeconst allocator_type &Effects: Constructs a basic_string taking the allocator as parameter, and is initialized by a specific number of characters of the s string. const CharT *size_typeEffects: Constructs a basic_string taking a default-constructed allocator, and is initialized by a specific number of characters of the s c-string. const CharT *size_typeconst allocator_type &Effects: Constructs a basic_string taking the allocator as parameter, and is initialized by a specific number of characters of the s c-string. const CharT *Effects: Constructs a basic_string with a default-constructed allocator, and is initialized by the null-terminated s c-string. const CharT *const allocator_type &Effects: Constructs a basic_string taking the allocator as parameter, and is initialized by the null-terminated s c-string. size_typeCharTEffects: Constructs a basic_string with a default-constructed allocator, and is initialized by n copies of c. size_typeCharTconst allocator_type &Effects: Constructs a basic_string taking the allocator as parameter, and is initialized by n copies of c. size_typedefault_init_tEffects: Constructs a basic_string with a default-constructed allocator, and is initialized by n default-initialized characters. size_typedefault_init_tconst allocator_type &Effects: Constructs a basic_string taking the allocator as parameter, and is initialized by n default-initialized characters. InputIteratorInputIteratorEffects: Constructs a basic_string with a default-constructed allocator, and a range of iterators. InputIteratorInputIteratorconst allocator_type &Effects: Constructs a basic_string taking the allocator as parameter, and a range of iterators. std::initializer_list< value_type >const allocator_type &allocator_type()Effects: Same as basic_string(il.begin(), il.end(), a). Effects: Destroys the basic_string. All used memory is deallocated.Throws: Nothing.Complexity: Constant. basic_string &const basic_string &Effects: Copy constructs a string.Postcondition: x == *this.Complexity: Linear to the elements x contains. basic_string &basic_string &&Effects: Move constructor. Moves x's resources to *this.Throws: If allocator_traits_type::propagate_on_container_move_assignment is false and allocation throwsComplexity: Constant if allocator_traits_type:: propagate_on_container_move_assignment is true or this->get>allocator() == x.get_allocator(). Linear otherwise. basic_string &const CharT *Effects: Assignment from a null-terminated c-string. basic_string &CharTEffects: Returns *this = basic_string(1, c). basic_string &BasicStringView< CharT, Traits >Effects: Equivalent to return assign(sv). basic_string &std::initializer_list< CharT >Effects: Returns *this = basic_string(il); Typedef for a basic_string of narrow characters basic_string< char,std::char_traits< char >,new_allocator< char > > Typedef for a basic_string of narrow characters basic_string< wchar_t,std::char_traits< wchar_t >,new_allocator< wchar_t > > InputIteratorInputIterator InputIteratorInputIteratorAllocator const & basic_string< CharT, Traits, Allocator >const basic_string< CharT, Traits, Allocator > &const basic_string< CharT, Traits, Allocator > & basic_string< CharT, Traits, Allocator >basic_string< CharT, Traits, Allocator > &&basic_string< CharT, Traits, Allocator > && basic_string< CharT, Traits, Allocator >basic_string< CharT, Traits, Allocator > &&const basic_string< CharT, Traits, Allocator > & basic_string< CharT, Traits, Allocator >const basic_string< CharT, Traits, Allocator > &basic_string< CharT, Traits, Allocator > && basic_string< CharT, Traits, Allocator >const CharT *basic_string< CharT, Traits, Allocator > basic_string< CharT, Traits, Allocator >basic_string< CharT, Traits, Allocator >const CharT * basic_string< CharT, Traits, Allocator >CharTbasic_string< CharT, Traits, Allocator > basic_string< CharT, Traits, Allocator >basic_string< CharT, Traits, Allocator >const CharT boolconst basic_string< CharT, Traits, Allocator > &const basic_string< CharT, Traits, Allocator > & boolconst CharT *const basic_string< CharT, Traits, Allocator > & boolconst basic_string< CharT, Traits, Allocator > &const CharT * boolBasicStringView< CharT, Traits >const basic_string< CharT, Traits, Allocator > & boolconst basic_string< CharT, Traits, Allocator > &BasicStringView< CharT, Traits > boolconst basic_string< CharT, Traits, Allocator > &const basic_string< CharT, Traits, Allocator > & boolconst CharT *const basic_string< CharT, Traits, Allocator > & boolconst basic_string< CharT, Traits, Allocator > &const CharT * boolBasicStringView< CharT, Traits >const basic_string< CharT, Traits, Allocator > & boolconst basic_string< CharT, Traits, Allocator > &BasicStringView< CharT, Traits > boolconst basic_string< CharT, Traits, Allocator > &const basic_string< CharT, Traits, Allocator > & boolconst CharT *const basic_string< CharT, Traits, Allocator > & boolconst basic_string< CharT, Traits, Allocator > &const CharT * boolBasicStringView< CharT, Traits >const basic_string< CharT, Traits, Allocator > & boolconst basic_string< CharT, Traits, Allocator > &BasicStringView< CharT, Traits > boolconst basic_string< CharT, Traits, Allocator > &const basic_string< CharT, Traits, Allocator > & boolconst CharT *const basic_string< CharT, Traits, Allocator > & boolconst basic_string< CharT, Traits, Allocator > &const CharT * boolBasicStringView< CharT, Traits >const basic_string< CharT, Traits, Allocator > & boolconst basic_string< CharT, Traits, Allocator > &BasicStringView< CharT, Traits > boolconst basic_string< CharT, Traits, Allocator > &const basic_string< CharT, Traits, Allocator > & boolconst CharT *const basic_string< CharT, Traits, Allocator > & boolconst basic_string< CharT, Traits, Allocator > &const CharT * boolBasicStringView< CharT, Traits >const basic_string< CharT, Traits, Allocator > & boolconst basic_string< CharT, Traits, Allocator > &BasicStringView< CharT, Traits > boolconst basic_string< CharT, Traits, Allocator > &const basic_string< CharT, Traits, Allocator > & boolconst CharT *const basic_string< CharT, Traits, Allocator > & boolconst basic_string< CharT, Traits, Allocator > &const CharT * boolBasicStringView< CharT, Traits >const basic_string< CharT, Traits, Allocator > & boolconst basic_string< CharT, Traits, Allocator > &BasicStringView< CharT, Traits > voidbasic_string< CharT, Traits, Allocator > &basic_string< CharT, Traits, Allocator > & std::basic_ostream< CharT, Traits > &std::basic_ostream< CharT, Traits > &const basic_string< CharT, Traits, Allocator > & std::basic_istream< CharT, Traits > &std::basic_istream< CharT, Traits > &basic_string< CharT, Traits, Allocator > & std::basic_istream< CharT, Traits > &std::istream &basic_string< CharT, Traits, Allocator > &CharT std::basic_istream< CharT, Traits > &std::basic_istream< CharT, Traits > &basic_string< CharT, Traits, Allocator > & std::size_tbasic_string< Ch, std::char_traits< Ch >, Allocator > const &
A portable metafunction to obtain a basic_string that uses a polymorphic allocator boost::container::basic_string< CharT, Traits, polymorphic_allocator< CharT > > boost::container::basic_string< CharT, Traits, polymorphic_allocator< CharT > > basic_string_of< char >::type basic_string_of< wchar_t >::type
BOOST_NORETURN voidException callback called by Boost.Container when fails to allocate the requested storage space. If BOOST_NO_EXCEPTIONS is NOT defined std::bad_alloc() is thrown. If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS is NOT defined BOOST_ASSERT(!"boost::container bad_alloc thrown") is called and std::abort() if the former returns. If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined the user must provide an implementation and the function should not return. BOOST_NORETURN voidconst char *Exception callback called by Boost.Container to signal arguments out of range. If BOOST_NO_EXCEPTIONS is NOT defined std::out_of_range(str) is thrown. If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS is NOT defined BOOST_ASSERT_MSG(!"boost::container out_of_range thrown", str) is called and std::abort() if the former returns. If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined the user must provide an implementation and the function should not return. BOOST_NORETURN voidconst char *Exception callback called by Boost.Container to signal errors resizing. If BOOST_NO_EXCEPTIONS is NOT defined std::length_error(str) is thrown. If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS is NOT defined BOOST_ASSERT_MSG(!"boost::container length_error thrown", str) is called and std::abort() if the former returns. If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined the user must provide an implementation and the function should not return. BOOST_NORETURN voidconst char *Exception callback called by Boost.Container to report errors in the internal logical of the program, such as violation of logical preconditions or class invariants. If BOOST_NO_EXCEPTIONS is NOT defined std::logic_error(str) is thrown. If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS is NOT defined BOOST_ASSERT_MSG(!"boost::container logic_error thrown", str) is called and std::abort() if the former returns. If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined the user must provide an implementation and the function should not return. BOOST_NORETURN voidconst char *Exception callback called by Boost.Container to report errors that can only be detected during runtime. If BOOST_NO_EXCEPTIONS is NOT defined std::runtime_error(str) is thrown. If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS is NOT defined BOOST_ASSERT_MSG(!"boost::container runtime_error thrown", str) is called and std::abort() if the former returns. If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined the user must provide an implementation and the function should not return.
Remark: if a specialization constructible_with_allocator_prefix<X>::value is true, indicates that T may be constructed with allocator_arg and T::allocator_type as its first two constructor arguments. Ideally, all constructors of T (including the copy and move constructors) should have a variant that accepts these two initial arguments.Requires: specialization constructible_with_allocator_prefix<X>::value is true, T must have a nested type, allocator_type and at least one constructor for which allocator_arg_t is the first parameter and allocator_type is the second parameter. If not all constructors of T can be called with these initial arguments, and if T is used in a context where a container must call such a constructor, then the program is ill-formed. template <class T, class Allocator = allocator<T> > class Y { public: typedef Allocator allocator_type; // Default constructor with and allocator-extended default constructor Y(); Y(allocator_arg_t, const allocator_type& a); // Copy constructor and allocator-extended copy constructor Y(const Y& yy); Y(allocator_arg_t, const allocator_type& a, const Y& yy); // Variadic constructor and allocator-extended variadic constructor template<class ...Args> Y(Args&& args...); template<class ...Args> Y(allocator_arg_t, const allocator_type& a, BOOST_FWD_REF(Args)... args); };// Specialize trait for class template Y template <class T, class Allocator = allocator<T> > struct constructible_with_allocator_prefix<Y<T,Allocator> > { static const bool value = true; };Note: This trait is a workaround inspired by "N2554: The Scoped Allocator Model (Rev 2)" (Pablo Halpern, 2008-02-29) to backport the scoped allocator model to C++03, as in C++03 there is no mechanism to detect if a type can be constructed from arbitrary arguments. Applications aiming portability with several compilers should always define this trait.In conforming C++11 compilers or compilers supporting SFINAE expressions (when BOOST_NO_SFINAE_EXPR is NOT defined), this trait is ignored and C++11 rules will be used to detect if a type should be constructed with suffix or prefix allocator arguments. const bool Remark: if a specialization constructible_with_allocator_suffix<X>::value is true, indicates that T may be constructed with an allocator as its last constructor argument. Ideally, all constructors of T (including the copy and move constructors) should have a variant that accepts a final argument of allocator_type.Requires: if a specialization constructible_with_allocator_suffix<X>::value is true, T must have a nested type, allocator_type and at least one constructor for which allocator_type is the last parameter. If not all constructors of T can be called with a final allocator_type argument, and if T is used in a context where a container must call such a constructor, then the program is ill-formed. template <class T, class Allocator = allocator<T> > class Z { public: typedef Allocator allocator_type; // Default constructor with optional allocator suffix Z(const allocator_type& a = allocator_type()); // Copy constructor and allocator-extended copy constructor Z(const Z& zz); Z(const Z& zz, const allocator_type& a); };// Specialize trait for class template Z template <class T, class Allocator = allocator<T> > struct constructible_with_allocator_suffix<Z<T,Allocator> > { static const bool value = true; }; Note: This trait is a workaround inspired by "N2554: The Scoped A Model (Rev 2)" (Pablo Halpern, 2008-02-29) to backport the scoped allocator model to C++03, as in C++03 there is no mechanism to detect if a type can be constructed from arbitrary arguments. Applications aiming portability with several compilers should always define this trait.In conforming C++11 compilers or compilers supporting SFINAE expressions (when BOOST_NO_SFINAE_EXPR is NOT defined), this trait is ignored and C++11 rules will be used to detect if a type should be constructed with suffix or prefix allocator arguments. const bool dtl::uses_allocator_imp< T, Allocator >Remark: Automatically detects whether T has a nested allocator_type that is convertible from Allocator. Meets the BinaryTypeTrait requirements ([meta.rqmts] 20.4.1). A program may specialize this type to define uses_allocator<X>::value as true for a T of user-defined type if T does not have a nested allocator_type but is nonetheless constructible using the specified Allocator where either: the first argument of a constructor has type allocator_arg_t and the second argument has type Alloc or the last argument of a constructor has type Alloc.Result: uses_allocator<T, Allocator>::value== true if a type T::allocator_type exists and either is_convertible<Alloc, T::allocator_type>::value != false or T::allocator_type is an alias erased_type. False otherwise.
This header forward declares boost::container::constructible_with_allocator_prefix, boost::container::constructible_with_allocator_suffix and boost::container::uses_allocator. Also defines the following types: The erased_type struct is an empty struct that serves as a placeholder for a type T in situations where the actual type T is determined at runtime. For example, the nested type, allocator_type, is an alias for erased_type in classes that use type-erased allocators. The allocator_arg_t struct is an empty structure type used as a unique type to disambiguate constructor and function overloading. Specifically, several types have constructors with allocator_arg_t as the first argument, immediately followed by an argument of a type that satisfies Allocator requirements unspecified allocator_arg_tA instance of type allocator_arg_t
A vector is a sequence that supports random access to elements, constant time insertion and removal of elements at the end, and linear time insertion and removal of elements at the beginning or in the middle. The number of elements in a vector may vary dynamically; memory management is automatic. T implementation_defined ::boost::container::allocator_traits< allocator_type > allocator_traits< allocator_type >::pointer allocator_traits< allocator_type >::const_pointer allocator_traits< allocator_type >::reference allocator_traits< allocator_type >::const_reference allocator_traits< allocator_type >::size_type allocator_traits< allocator_type >::difference_type allocator_type implementation_defined implementation_defined implementation_defined implementation_defined voidInItInIt last 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. voidstd::initializer_list< T >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. voidFwdItFwdIt last 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. voidsize_typeconst value_type &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_typeEffects: Returns a copy of the internal allocator.Throws: If allocator's copy constructor throws.Complexity: Constant. stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. const stored_allocator_type &Effects: Returns a reference to the internal allocator.Throws: NothingComplexity: Constant.Note: Non-standard extension. iteratorEffects: Returns an iterator to the first element contained in the vector.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the vector.Throws: Nothing.Complexity: Constant. iteratorEffects: Returns an iterator to the end of the vector.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the vector.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the beginning of the reversed vector.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed vector.Throws: Nothing.Complexity: Constant. reverse_iteratorEffects: Returns a reverse_iterator pointing to the end of the reversed vector.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed vector.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the first element contained in the vector.Throws: Nothing.Complexity: Constant. const_iteratorEffects: Returns a const_iterator to the end of the vector.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the beginning of the reversed vector.Throws: Nothing.Complexity: Constant. const_reverse_iteratorEffects: Returns a const_reverse_iterator pointing to the end of the reversed vector.Throws: Nothing.Complexity: Constant. boolEffects: Returns true if the vector contains no elements.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the number of the elements contained in the vector.Throws: Nothing.Complexity: Constant. size_typeEffects: Returns the largest possible size of the vector.Throws: Nothing.Complexity: Constant. voidsize_typeEffects: 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. voidsize_typedefault_init_tEffects: 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 voidsize_typeconst T &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_typeEffects: Number of elements for which memory has been allocated. capacity() is always greater than or equal to size().Throws: Nothing.Complexity: Constant. voidsize_typeEffects: 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. voidEffects: Tries to deallocate the excess of memory created with previous allocations. The size of the vector is unchangedThrows: If memory allocation throws, or T's copy/move constructor throws.Complexity: Linear to size(). referenceRequires: !empty()Effects: Returns a reference to the first element of the container.Throws: Nothing.Complexity: Constant. const_referenceRequires: !empty()Effects: Returns a const reference to the first element of the container.Throws: Nothing.Complexity: Constant. referenceRequires: !empty()Effects: Returns a reference to the last element of the container.Throws: Nothing.Complexity: Constant. const_referenceRequires: !empty()Effects: Returns a const reference to the last element of the container.Throws: Nothing.Complexity: Constant. referencesize_typeRequires: size() > n.Effects: Returns a reference to the nth element from the beginning of the container.Throws: Nothing.Complexity: Constant. const_referencesize_typeRequires: size() > n.Effects: Returns a const reference to the nth element from the beginning of the container.Throws: Nothing.Complexity: Constant. iteratorsize_typeRequires: 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_iteratorsize_typeRequires: 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_typeiteratorRequires: 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_typeconst_iteratorRequires: 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 referencesize_typeRequires: 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_referencesize_typeRequires: 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 *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 *Returns: A pointer such that [data(),data() + size()) is a valid range. For a non-empty vector, data() == &front().Throws: Nothing.Complexity: Constant. referenceArgs &&...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. boolArgs &&...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. iteratorconst_iteratorArgs &&...Requires: position must be a valid iterator of *this.Effects: Inserts an object of type T constructed with std::forward<Args>(args)... before positionThrows: 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. voidconst T &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. voidT &&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. iteratorconst_iteratorconst T &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. iteratorconst_iteratorT &&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. iteratorconst_iteratorsize_typeconst T &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. iteratorconst_iteratorInItInItRequires: 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). iteratorconst_iteratorstd::initializer_list< value_type >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()). voidEffects: Removes the last element from the container.Throws: Nothing.Complexity: Constant time. iteratorconst_iteratorEffects: 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. iteratorconst_iteratorconst_iteratorEffects: 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. voidvector &Effects: Swaps the contents of *this and x.Throws: Nothing.Complexity: Constant. voidEffects: Erases all the elements of the vector.Throws: Nothing.Complexity: Linear to the number of elements in the container. Effects: Constructs a vector taking the allocator as parameter.Throws: Nothing.Complexity: Constant. const allocator_type &Effects: Constructs a vector taking the allocator as parameter.Throws: NothingComplexity: Constant. size_typeEffects: Constructs a vector and inserts n value initialized values.Throws: If allocator_type's allocation throws or T's value initialization throws.Complexity: Linear to n. size_typeconst allocator_type &Effects: Constructs a vector that will use a copy of allocator a and inserts n value initialized values.Throws: If allocator_type's allocation throws or T's value initialization throws.Complexity: Linear to n. size_typedefault_init_tEffects: Constructs a vector that will use a copy of allocator a and inserts n default initialized values.Throws: If allocator_type's allocation throws or T's default initialization throws.Complexity: Linear to n.Note: Non-standard extension size_typedefault_init_tconst allocator_type &Effects: Constructs a vector that will use a copy of allocator a and inserts n default initialized values.Throws: If allocator_type's allocation throws or T's default initialization throws.Complexity: Linear to n.Note: Non-standard extension size_typeconst T &Effects: Constructs a vector and inserts n copies of value.Throws: If allocator_type's allocation throws or T's copy constructor throws.Complexity: Linear to n. size_typeconst T &const allocator_type &Effects: Constructs a vector that will use a copy of allocator a and inserts n copies of value.Throws: If allocation throws or T's copy constructor throws.Complexity: Linear to n. InItInIt last Effects: Constructs a vector and inserts a copy of the range [first, last) in the vector.Throws: If allocator_type's allocation throws or T's constructor taking a dereferenced InIt throws.Complexity: Linear to the range [first, last). InItInItconst allocator_type &a Effects: Constructs a vector that will use a copy of allocator a and inserts a copy of the range [first, last) in the vector.Throws: If allocator_type's allocation throws or T's constructor taking a dereferenced InIt throws.Complexity: Linear to the range [first, last). const vector &Effects: Copy constructs a vector.Postcondition: x == *this.Throws: If allocator_type's allocation throws or T's copy constructor throws.Complexity: Linear to the elements x contains. vector &&Effects: Move constructor. Moves x's resources to *this.Throws: NothingComplexity: Constant. std::initializer_list< value_type >const allocator_type &allocator_type()Effects: Constructs a vector that will use a copy of allocator a and inserts a copy of the range [il.begin(), il.last()) in the vectorThrows: If T's constructor taking a dereferenced initializer_list iterator throws.Complexity: Linear to the range [il.begin(), il.end()). const vector &const allocator_type &defined(BOOST_CONTAINER_DOXYGEN_INVOKED) Effects: Copy constructs a vector using the specified allocator.Postcondition: x == *this.Throws: If allocation throws or T's copy constructor throws.Complexity: Linear to the elements x contains. vector &&const allocator_type &Effects: Move constructor using the specified allocator. Moves x's resources to *this if a == allocator_type(). Otherwise copies values from x to *this.Throws: If allocation or T's copy constructor throws.Complexity: Constant if a == x.get_allocator(), linear otherwise. Effects: Destroys the vector. All stored values are destroyed and used memory is deallocated.Throws: Nothing.Complexity: Linear to the number of elements. vector &const vector &Effects: Makes *this contain the same elements as x.Postcondition: this->size() == x.size(). *this contains a copy of each of x's elements.Throws: If memory allocation throws or T's copy/move constructor/assignment throws.Complexity: Linear to the number of elements in x. vector &std::initializer_list< value_type >Effects: Make *this container contains elements from il.Complexity: Linear to the range [il.begin(), il.end()). vector &vector &&Effects: Move assignment. All x's values are transferred to *this.Postcondition: x.empty(). *this contains a the elements x had before the function.Throws: If allocator_traits_type::propagate_on_container_move_assignment is false and (allocation throws or value_type's move constructor throws)Complexity: Constant if allocator_traits_type:: propagate_on_container_move_assignment is true or this->get>allocator() == x.get_allocator(). Linear otherwise. friend boolconst vector &const vector &Effects: Returns true if x and y are equalComplexity: Linear to the number of elements in the container. friend boolconst vector &const vector &Effects: Returns true if x and y are unequalComplexity: Linear to the number of elements in the container. friend boolconst vector &const vector &Effects: Returns true if x is less than yComplexity: Linear to the number of elements in the container. friend boolconst vector &const vector &Effects: Returns true if x is greater than yComplexity: Linear to the number of elements in the container. friend boolconst vector &const vector &Effects: Returns true if x is equal or less than yComplexity: Linear to the number of elements in the container. friend boolconst vector &const vector &Effects: Returns true if x is equal or greater than yComplexity: Linear to the number of elements in the container. friend voidvector &vector &Effects: x.swap(y)Complexity: Constant. InputIteratorInputIterator InputIteratorInputIteratorAllocator const &
A portable metafunction to obtain a vector that uses a polymorphic allocator boost::container::vector< T, polymorphic_allocator< T > > boost::container::vector< T, polymorphic_allocator< T > >