# Boost.Container Header Reference

std::size_t ADP_nodes_per_block
std::size_t ADP_max_free_blocks
std::size_t ADP_overhead_percent BOOST_CONTAINER_DOCIGN( BOOST_MOVE_I unsigned Version )

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 BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I Version) >

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 BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I Version) >
T
T *
const T *
::boost::container::dtl::unvoid_ref< T >::type
::boost::container::dtl::unvoid_ref< constT >::type
std::size_t
std::ptrdiff_t
boost::container::dtl::version_type< `self_t`, Version >
BOOST_STATIC_CONSTEXPR std::size_t
BOOST_STATIC_CONSTEXPR std::size_t
BOOST_STATIC_CONSTEXPR std::size_t
BOOST_STATIC_CONSTEXPR std::size_t
BOOST_CONTAINER_STATIC_ASSERT((Version<=2))
Default constructor.
const `adaptive_pool` &
Copy constructor from other adaptive_pool.
`adaptive_pool` & `const `adaptive_pool` &` Copy assignment 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.
size_type

Returns the number of elements that could be allocated. Never throws

pointer `size_type` `const void *0`

Allocate memory for an array of count elements. Throws bad_alloc if there is no enough memory

void `const pointer &` `size_type`

Deallocate allocated memory. Never throws

pointer `allocation_type` `size_type` `size_type &` `pointer &`
size_type `pointer`

Returns maximum the number of objects the previously allocated memory pointed by p can hold.

pointer

Allocates just one object. Memory allocated with this function must be deallocated only with deallocate_one(). Throws bad_alloc if there is no enough memory

void `std::size_t` `multiallocation_chain &`

Allocates many elements of size == 1. Elements must be individually deallocated with deallocate_one()

void `pointer`

Deallocates 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

void `multiallocation_chain &`
void `size_type` `std::size_t` `multiallocation_chain &`

Allocates many elements of size elem_size. Elements must be individually deallocated with deallocate()

void `const size_type *` `size_type` `multiallocation_chain &`

Allocates n_elements elements, each one of size elem_sizes[i] Elements must be individually deallocated with deallocate()

void `multiallocation_chain &`
void Deallocates all free blocks of the pool.
void ``adaptive_pool` &` ``adaptive_pool` &`

Swaps allocators. Does not throw. If each allocator is placed in a different memory segment, the result is undefined.

bool `const `adaptive_pool` &` `const `adaptive_pool` &`

An allocator always compares to true, as memory allocated with one instance can be deallocated by another instance

bool `const `adaptive_pool` &` `const `adaptive_pool` &`

An allocator always compares to false, as memory allocated with one instance can be deallocated by another instance

pointer `allocation_type` `std::size_t` `size_type &` `pointer &`
std::size_t ADP_nodes_per_block
std::size_t ADP_max_free_blocks
std::size_t ADP_overhead_percent
unsigned 2

Obtains private_adaptive_pool from private_adaptive_pool

private_adaptive_pool< T2, NodesPerBlock, MaxFreeBlocks, OverheadPercent BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I Version) >

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 BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I Version) >
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< constT >::type
std::size_t
std::ptrdiff_t
boost::container::dtl::version_type< self_t, Version >
BOOST_STATIC_CONSTEXPR std::size_t
BOOST_STATIC_CONSTEXPR std::size_t
BOOST_STATIC_CONSTEXPR std::size_t
BOOST_STATIC_CONSTEXPR std::size_t
pool_t
BOOST_CONTAINER_STATIC_ASSERT((Version<=2))
Default constructor.
const private_adaptive_pool &
Copy constructor from other private_adaptive_pool.
private_adaptive_pool & `const private_adaptive_pool &` Copy assignment from other 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.
size_type

Returns the number of elements that could be allocated. Never throws

pointer `size_type` `const void *0`

Allocate memory for an array of count elements. Throws bad_alloc if there is no enough memory

void `const pointer &` `size_type`

Deallocate allocated memory. Never throws

pointer `allocation_type` `size_type` `size_type &` `pointer &`
size_type `pointer`

Returns maximum the number of objects the previously allocated memory pointed by p can hold.

pointer

Allocates just one object. Memory allocated with this function must be deallocated only with deallocate_one(). Throws bad_alloc if there is no enough memory

void `std::size_t` `multiallocation_chain &`

Allocates many elements of size == 1. Elements must be individually deallocated with deallocate_one()

void `pointer`

Deallocates 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

void `multiallocation_chain &`
void `size_type` `std::size_t` `multiallocation_chain &`

Allocates many elements of size elem_size. Elements must be individually deallocated with deallocate()

void `const size_type *` `size_type` `multiallocation_chain &`

Allocates n_elements elements, each one of size elem_sizes[i] Elements must be individually deallocated with deallocate()

void `multiallocation_chain &`
void Deallocates all free blocks of the pool.
void `private_adaptive_pool &` `private_adaptive_pool &`

Swaps allocators. Does not throw. If each allocator is placed in a different memory segment, the result is undefined.

bool `const 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

bool `const 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

pointer `allocation_type` `std::size_t` `size_type &` `pointer &`
unsigned 2
unsigned int 0

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 >

Default constructor Never throws

const `allocator` &

Constructor from other allocator. Never throws

const `allocator`< T2 > &

Constructor from related allocator. Never throws

pointer `size_type` `const void *0`

Allocates memory for an array of count elements. Throws 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()

void `pointer` `size_type`

Deallocates previously allocated memory. Never throws

size_type

Returns the maximum number of elements that could be allocated. Never throws

pointer `allocation_type` `size_type` `size_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_type `pointer`

Returns 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

pointer

Allocates 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

void `std::size_t` `multiallocation_chain &`

Allocates many elements of size == 1. Elements must be individually deallocated with deallocate_one() This function is available only with Version == 2

void `pointer`

Deallocates 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.

void `multiallocation_chain &`

Deallocates memory allocated with allocate_one() or allocate_individual(). This function is available only with Version == 2

void `size_type` `std::size_t` `multiallocation_chain &`

Allocates many elements of size elem_size. Elements must be individually deallocated with deallocate() This function is available only with Version == 2

void `const size_type *` `size_type` `multiallocation_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

void `multiallocation_chain &`

Deallocates several elements allocated by allocate_many(), allocate(), or allocation_command(). This function is available only with Version == 2

void `self_t &` `self_t &`

Swaps two allocators, does nothing because this allocator is stateless

bool `const `allocator` &` `const `allocator` &`

An allocator always compares to true, as memory allocated with one instance can be deallocated by another instance

bool `const `allocator` &` `const `allocator` &`

An allocator always compares to false, as memory allocated with one instance can be deallocated by another instance

pointer `allocation_type` `std::size_t` `size_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 > >
pointer `Allocator &` `size_type`

Returns: `a.allocate(n)`

void `Allocator &` `pointer` `size_type`

Returns: `a.deallocate(p, n)`

Throws: Nothing

pointer `Allocator &` `size_type` `const_void_pointer`

Effects: calls `a.allocate(n, p)` if that call is well-formed; otherwise, invokes `a.allocate(n)`

void `Allocator &` `T *`

Effects: calls `a.destroy(p)` if that call is well-formed; otherwise, invokes `p->~T()`.

size_type `const Allocator &`

Returns: `a.max_size()` if that expression is well-formed; otherwise, `numeric_limits<size_type>::max()`.

Allocator `const Allocator &`

Returns: `a.select_on_container_copy_construction()` if that expression is well-formed; otherwise, a.

void class ... `Allocator &` `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)...)`

bool `const Allocator &` `pointer`

Returns: `a.storage_is_unpropagable(p)` if is_partially_propagable::value is true; otherwise, `false`.

bool `const Allocator &` `const Allocator &`

Returns: `true` if `is_always_equal::value == true`, otherwise, `a == b`.

void class ... `T *` `Args &&...`
dtl::enable_if< dtl::is_pair< Pair >, void >::type class ... `Pair *` `try_emplace_t` `KeyType &&` `Args &&...`
dtl::enable_if< dtl::is_pair< T >, void >::type `T *`
dtl::enable_if_c< dtl::is_pair< T >::value, void >::type `T *` `U &`
unspecified `T *` `U &&`
dtl::enable_if< dtl::is_pair< T >, void >::type `T *` `U &&` `V &&`

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::devector

- 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_t

Type used to tag that the input range is guaranteed to be ordered and unique

BOOST_CONTAINER_CONSTANT_VAR `ordered_range_t`

Value used to tag that the input range is guaranteed to be ordered

BOOST_CONTAINER_CONSTANT_VAR `ordered_unique_range_t`

Value used to tag that the input range is guaranteed to be ordered and unique

BOOST_CONTAINER_CONSTANT_VAR `default_init_t`

Value used to tag that the inserted values should be default initialized

The type of object that is stored in the deque

void
void

A type produced from `boost::container::deque_options`.

deque_base< real_allocator< T, void >::type, void >

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

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: Nothing

Complexity: Constant.

size_type

Effects: 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_type
default_init_t

Effects: 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_type
const 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_type
default_init_t
const 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_type
const 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_type
const 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.

InIt
InIt

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).

InIt
InIt
const 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.

void `size_type` `const 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.

void `InIt` `InIt`

Effects: 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.

void `std::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_type

Effects: 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: Nothing

Complexity: Constant.

Note: Non-standard extension.

stored_allocator_type &

Effects: Returns a reference to the internal allocator.

Throws: Nothing

Complexity: Constant.

Note: Non-standard extension.

iterator

Effects: Returns an iterator to the first element contained in the deque.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the deque.

Throws: Nothing.

Complexity: Constant.

iterator

Effects: Returns an iterator to the end of the deque.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the deque.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the beginning of the reversed deque.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed deque.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the end of the reversed deque.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed deque.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the deque.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the deque.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed deque.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed deque.

Throws: Nothing.

Complexity: Constant.

bool

Effects: Returns true if the deque contains no elements.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the number of the elements contained in the deque.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the largest possible size of the deque.

Throws: Nothing.

Complexity: Constant.

void `size_type`

Effects: Inserts or erases elements at the end such that the size becomes n. New elements are value initialized.

Throws: If memory allocation throws, or T's constructor throws.

Complexity: Linear to the difference between size() and new_size.

void `size_type` ``default_init_t``

Effects: Inserts or erases elements at the end such that the size becomes n. New elements are default initialized.

Throws: If memory allocation throws, or T's constructor throws.

Complexity: Linear to the difference between size() and new_size.

Note: Non-standard extension

void `size_type` `const 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.

void

Effects: Tries to deallocate the excess of memory created with previous allocations. The size of the deque is unchanged

Throws: If memory allocation throws.

Complexity: Constant.

reference

Requires: !empty()

Effects: Returns a reference to the first element of the container.

Throws: Nothing.

Complexity: Constant.

const_reference

Requires: !empty()

Effects: Returns a const reference to the first element from the beginning of the container.

Throws: Nothing.

Complexity: Constant.

reference

Requires: !empty()

Effects: Returns a reference to the last element of the container.

Throws: Nothing.

Complexity: Constant.

const_reference

Requires: !empty()

Effects: Returns a const reference to the last element of the container.

Throws: Nothing.

Complexity: Constant.

reference `size_type`

Requires: size() > n.

Effects: Returns a reference to the nth element from the beginning of the container.

Throws: Nothing.

Complexity: Constant.

const_reference `size_type`

Requires: size() > n.

Effects: Returns a const reference to the nth element from the beginning of the container.

Throws: Nothing.

Complexity: Constant.

iterator `size_type`

Requires: size() >= n.

Effects: Returns an iterator to the nth element from the beginning of the container. Returns end() if n == size().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

const_iterator `size_type`

Requires: size() >= n.

Effects: Returns a const_iterator to the nth element from the beginning of the container. Returns end() if n == size().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

size_type `iterator`

Requires: begin() <= p <= end().

Effects: Returns the index of the element pointed by p and size() if p == end().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

size_type `const_iterator`

Requires: begin() <= p <= end().

Effects: Returns the index of the element pointed by p and size() if p == end().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

reference `size_type`

Requires: size() > n.

Effects: Returns a reference to the nth element from the beginning of the container.

Throws: range_error if n >= size()

Complexity: Constant.

const_reference `size_type`

Requires: size() > n.

Effects: Returns a const reference to the nth element from the beginning of the container.

Throws: range_error if n >= size()

Complexity: Constant.

reference class... `Args &&...`

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

reference class... `Args &&...`

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

iterator class... `const_iterator` `Args &&...`

Requires: p must be a valid iterator of *this.

Effects: Inserts an object of type T constructed with std::forward<Args>(args)... before p

Throws: If memory allocation throws or the in-place constructor throws.

Complexity: If p is end(), amortized constant time Linear time otherwise.

void `const 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.

void `T &&`

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.

void `const 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.

void `T &&`

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.

iterator `const_iterator` `const 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.

iterator `const_iterator` `T &&`

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.

iterator `const_iterator` `size_type` `const 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.

iterator `const_iterator` `InIt` `InIt`

Requires: 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).

iterator `const_iterator` `std::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()).

void

Effects: Removes the first element from the deque.

Throws: Nothing.

Complexity: Constant time.

void

Effects: Removes the last element from the deque.

Throws: Nothing.

Complexity: Constant time.

iterator `const_iterator`

Effects: 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.

iterator `const_iterator` `const_iterator`

Effects: 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).

void ``deque` &`

Effects: Swaps the contents of *this and x.

Throws: Nothing.

Complexity: Constant.

void

Effects: Erases all the elements of the deque.

Throws: Nothing.

Complexity: Linear to the number of elements in the deque.

bool `const `deque` &` `const `deque` &`

Effects: Returns true if x and y are equal

Complexity: Linear to the number of elements in the container.

bool `const `deque` &` `const `deque` &`

Effects: Returns true if x and y are unequal

Complexity: Linear to the number of elements in the container.

bool `const `deque` &` `const `deque` &`

Effects: Returns true if x is less than y

Complexity: Linear to the number of elements in the container.

bool `const `deque` &` `const `deque` &`

Effects: Returns true if x is greater than y

Complexity: Linear to the number of elements in the container.

bool `const `deque` &` `const `deque` &`

Effects: Returns true if x is equal or less than y

Complexity: Linear to the number of elements in the container.

bool `const `deque` &` `const `deque` &`

Effects: Returns true if x is equal or greater than y

Complexity: Linear to the number of elements in the container.

void ``deque` &` ``deque` &`

Effects: x.swap(y)

Complexity: Constant.

InputIterator
InputIterator
InputIterator
InputIterator
Allocator 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 > >
void
void

A type produced from `boost::container::devector_options`.

A vector-like sequence container providing front and back operations (e.g: `push_front`/`pop_front`/`push_back`/`pop_back`) with amortized constant complexity.

Models the SequenceContainer, ReversibleContainer, and AllocatorAwareContainer concepts.

Requires:

- `T` shall be MoveInsertable into the devector.

- `T` shall be Erasable from any `devector<T, allocator_type, GP>`.

- `GrowthFactor`, and `Allocator` must model the concepts with the same names or be void.

Definition: `T` is `NothrowConstructible` if it's either nothrow move constructible or nothrow copy constructible.

Definition: `T` is `NothrowAssignable` if it's either nothrow move assignable or nothrow copy assignable.

Exceptions: The exception specifications assume `T` is nothrow Destructible.

Most methods providing the strong exception guarantee assume `T` either has a move constructor marked noexcept or is CopyInsertable into the devector. If it isn't true, and the move constructor throws, the guarantee is waived and the effects are unspecified.

In addition to the exceptions specified in the Throws clause, the following operations of `T` can throw when any of the specified concept is required:

- DefaultInsertable: Default constructor

- MoveInsertable: Move constructor

- CopyInsertable: Copy constructor

- DefaultConstructible: Default constructor

- EmplaceConstructible: Constructor selected by the given arguments

- MoveAssignable: Move assignment operator

- CopyAssignable: Copy assignment operator

Furthermore, not `noexcept` methods throws whatever the allocator throws if memory allocation fails. Such methods also throw `length_error` if the capacity exceeds `max_size()`.

Remark: If a method invalidates some iterators, it also invalidates references and pointers to the elements pointed by the invalidated iterators.

!

T
implementation_defined
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
pointer
const_pointer
implementation_defined
implementation_defined

Effects: Constructs an empty devector.

Postcondition: `empty() && front_free_capacity() == 0 && back_free_capacity() == 0`.

Complexity: Constant.

const allocator_type &

Effects: Constructs an empty devector, using the specified allocator.

Postcondition: `empty() && front_free_capacity() == 0 && back_free_capacity() == 0`.

Complexity: Constant.

size_type
reserve_only_tag_t
const allocator_type &
allocator_type()

Effects: Constructs an empty devector, using the specified allocator and reserves `n` slots as if `reserve(n)` was called.

Postcondition: `empty() && capacity() >= n`.

Exceptions: Strong exception guarantee.

Complexity: Constant.

size_type
size_type
reserve_only_tag_t
const allocator_type &
allocator_type()

Effects: Constructs an empty devector, using the specified allocator and reserves at least `front_free_cap + back_free_cap` slots as if `reserve_front(front_cap)` and `reserve_back(back_cap)` was called.

Postcondition: `empty() && front_free_capacity() >= front_free_cap && back_free_capacity() >= back_free_cap`.

Exceptions: Strong exception guarantee.

Complexity: Constant.

size_type
const allocator_type &
allocator_type()

Effects: Constructs a devector with `n` value_initialized elements using the specified allocator.

Requires: `T` shall be DefaultInsertable into `*this`.

Postcondition: `size() == n`.

Exceptions: Strong exception guarantee.

Complexity: Linear in `n`.

size_type
default_init_t
const allocator_type &
allocator_type()

Effects: Constructs a devector with `n` default-initialized elements using the specified allocator.

Requires: `T` shall be [DefaultInsertable] into `*this`.

Postcondition: `size() == n`.

Exceptions: Strong exception guarantee.

Complexity: Linear in `n`.

size_type
const T &
const allocator_type &
allocator_type()

Effects: Constructs a devector with `n` copies of `value`, using the specified allocator.

Requires: `T` shall be CopyInsertable into `*this`.

Postcondition: `size() == n`.

Exceptions: Strong exception guarantee.

Complexity: Linear in `n`.

InputIterator
InputIterator
const allocator_type &
allocator_type() BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename dtl::disable_if_or< void BOOST_MOVE_I dtl::is_convertible< InputIterator BOOST_MOVE_I size_type > BOOST_MOVE_I dtl::is_not_input_iterator< InputIterator > >::type *=0)

Effects: Constructs a devector equal to the range `[first,last)`, using the specified allocator.

Requires: `T` shall be EmplaceConstructible into `*this` from `*first`. If the specified iterator does not meet the forward iterator requirements, `T` shall also be MoveInsertable into `*this`.

Postcondition: `size() == boost::container::iterator_distance(first, last)

Exceptions: Strong exception guarantee.

Complexity: Makes only `N` calls to the copy constructor of `T` (where `N` is the distance between `first` and `last`), at most one allocation and no reallocations if iterators first and last are of forward, bidirectional, or random access categories. It makes `O(N)` calls to the copy constructor of `T` and `O(log(N)) reallocations if they are just input iterators.

Remarks: Each iterator in the range `[first,last)` shall be dereferenced exactly once, unless an exception is thrown.

const `devector` &

Effects: Copy constructs a devector.

Requires: `T` shall be CopyInsertable into `*this`.

Postcondition: `this->size() == x.size()`.

Exceptions: Strong exception guarantee.

Complexity: Linear in the size of `x`.

const `devector` &
const allocator_type &

Effects: Copy constructs a devector, using the specified allocator.

Requires: `T` shall be CopyInsertable into `*this`.

Postcondition: `*this == x`.

Exceptions: Strong exception guarantee.

Complexity: Linear in the size of `x`.

devector
&&

Effects: Moves `rhs`'s resources to `*this`.

Throws: Nothing.

Postcondition: *this has the same value `rhs` had before the operation. `rhs` is left in an unspecified but valid state.

Exceptions: Strong exception guarantee if not `noexcept`.

Complexity: Constant.

devector
&&
const allocator_type &

Effects: Moves `rhs`'s resources to `*this`, using the specified allocator.

Throws: If allocation or T's move constructor throws.

Postcondition: *this has the same value `rhs` had before the operation. `rhs` is left in an unspecified but valid state.

Exceptions: Strong exception guarantee if not `noexcept`.

Complexity: Linear if allocator != rhs.get_allocator(), otherwise constant.

const std::initializer_list< T > &
const allocator_type &
allocator_type()

Equivalent to: `devector(il.begin(), il.end(), allocator)`.

Effects: Destroys the devector. All stored values are destroyed and used memory, if any, deallocated.

Complexity: Linear in the size of `*this`.

`devector` & `const `devector` &`

Effects: Copies elements of `x` to `*this`. Previously held elements get copy assigned to or destroyed.

Requires: `T` shall be CopyInsertable into `*this`.

Postcondition: `this->size() == x.size()`, the elements of `*this` are copies of elements in `x` in the same order.

Returns: `*this`.

Exceptions: Strong exception guarantee if `T` is `NothrowConstructible` and the allocator is allowed to be propagated (propagate_on_container_copy_assignment is true), Basic exception guarantee otherwise.

Complexity: Linear in the size of `x` and `*this`.

`devector` & ``devector` &&`

Effects: Moves elements of `x` to `*this`. Previously held elements get move/copy assigned to or destroyed.

Requires: `T` shall be MoveInsertable into `*this`.

Postcondition: `x` is left in an unspecified but valid state.

Returns: `*this`.

Exceptions: Basic exception guarantee if not `noexcept`.

Complexity: Constant if allocator_traits_type:: propagate_on_container_move_assignment is true or this->get>allocator() == x.get_allocator(). Linear otherwise.

`devector` & `std::initializer_list< T >`

Effects: Copies elements of `il` to `*this`. Previously held elements get copy assigned to or destroyed.

Requires: `T` shall be CopyInsertable into `*this` and CopyAssignable.

Postcondition: `this->size() == il.size()`, the elements of `*this` are copies of elements in `il` in the same order.

Exceptions: Strong exception guarantee if `T` is nothrow copy assignable from `T` and `NothrowConstructible`, Basic exception guarantee otherwise.

Returns: `*this`.

Complexity: Linear in the size of `il` and `*this`.

void `InputIterator` `InputIterator last`

Effects: Replaces elements of `*this` with a copy of `[first,last)`. Previously held elements get copy assigned to or destroyed.

Requires: `T` shall be EmplaceConstructible from `*first`. If the specified iterator does not meet the forward iterator requirements, `T` shall be also MoveInsertable into `*this`.

Precondition: `first` and `last` are not iterators into `*this`.

Postcondition: `size() == N`, where `N` is the distance between `first` and `last`.

Exceptions: Strong exception guarantee if `T` is nothrow copy assignable from `*first` and `NothrowConstructible`, Basic exception guarantee otherwise.

Complexity: Linear in the distance between `first` and `last`. Makes a single reallocation at most if the iterators `first` and `last` are of forward, bidirectional, or random access categories. It makes `O(log(N))` reallocations if they are just input iterators.

Remarks: Each iterator in the range `[first,last)` shall be dereferenced exactly once, unless an exception is thrown.

void `size_type` `const T &`

Effects: Replaces elements of `*this` with `n` copies of `u`. Previously held elements get copy assigned to or destroyed.

Requires: `T` shall be CopyInsertable into `*this` and CopyAssignable.

Precondition: `u` is not a reference into `*this`.

Postcondition: `size() == n` and the elements of `*this` are copies of `u`.

Exceptions: Strong exception guarantee if `T` is nothrow copy assignable from `u` and `NothrowConstructible`, Basic exception guarantee otherwise.

Complexity: Linear in `n` and the size of `*this`.

void `std::initializer_list< T >`

Equivalent to: `assign(il.begin(), il.end())`.

allocator_type

Returns: A copy of the allocator associated with the container.

Complexity: Constant.

const allocator_type &
allocator_type &
iterator

Returns: A iterator pointing to the first element in the devector, or the past the end iterator if the devector is empty.

Complexity: Constant.

const_iterator

Returns: A constant iterator pointing to the first element in the devector, or the past the end iterator if the devector is empty.

Complexity: Constant.

iterator

Returns: An iterator pointing past the last element of the container.

Complexity: Constant.

const_iterator

Returns: A constant iterator pointing past the last element of the container.

Complexity: Constant.

reverse_iterator

Returns: A reverse iterator pointing to the first element in the reversed devector, or the reverse past the end iterator if the devector is empty.

Complexity: Constant.

const_reverse_iterator

Returns: A constant reverse iterator pointing to the first element in the reversed devector, or the reverse past the end iterator if the devector is empty.

Complexity: Constant.

reverse_iterator

Returns: A reverse iterator pointing past the last element in the reversed container, or to the beginning of the reversed container if it's empty.

Complexity: Constant.

const_reverse_iterator

Returns: A constant reverse iterator pointing past the last element in the reversed container, or to the beginning of the reversed container if it's empty.

Complexity: Constant.

const_iterator

Returns: A constant iterator pointing to the first element in the devector, or the past the end iterator if the devector is empty.

Complexity: Constant.

const_iterator

Returns: A constant iterator pointing past the last element of the container.

Complexity: Constant.

const_reverse_iterator

Returns: A constant reverse iterator pointing to the first element in the reversed devector, or the reverse past the end iterator if the devector is empty.

Complexity: Constant.

const_reverse_iterator

Returns: A constant reverse iterator pointing past the last element in the reversed container, or to the beginning of the reversed container if it's empty.

Complexity: Constant.

bool

Returns: True, if `size() == 0`, false otherwise.

Complexity: Constant.

size_type

Returns: The number of elements the devector contains.

Complexity: Constant.

size_type

Returns: The maximum number of elements the devector could possibly hold.

Complexity: Constant.

size_type

Returns: The minimum number of elements that can be inserted into devector using position-based insertions without requiring a reallocation. Note that, unlike in typical sequence containers like `vector`, `capacity()`, `capacity()` can be smaller than `size()`. This can happen if a user inserts elements in a particular way (usually inserting at front up to front_free_capacity() and at back up to back_free_capacity()).

Complexity: Constant.

size_type

Returns: The total number of elements that can be pushed to the front of the devector without requiring reallocation.

Complexity: Constant.

size_type

Returns: The total number of elements that can be pushed to the back of the devector without requiring reallocation.

Complexity: Constant.

void `size_type`

Effects: If `sz` is greater than the size of `*this`, additional value-initialized elements are inserted. Invalidates iterators if reallocation is needed. If `sz` is smaller than than the size of `*this`, elements are erased from the extremes.

Requires: T shall be MoveInsertable into *this and DefaultConstructible.

Postcondition: `sz == size()`.

Exceptions: Strong exception guarantee.

Complexity: Linear in the size of `*this` and `sz`.

void `size_type` ``default_init_t``

Effects: Same as resize(sz) but creates default-initialized value-initialized.

void `size_type` `const T &`

Effects: If `sz` is greater than the size of `*this`, copies of `c` are inserted at extremes. If `sz` is smaller than than the size of `*this`, elements are popped from the extremes.

Postcondition: `sz == size()`.

Requires: `T` shall be CopyInsertable into `*this`.

Exceptions: Strong exception guarantee.

Complexity: Linear in the size of `*this` and `sz`.

void `size_type`

Effects: If `sz` is greater than the size of `*this`, additional value-initialized elements are inserted to the front. Invalidates iterators if reallocation is needed. If `sz` is smaller than than the size of `*this`, elements are popped from the front.

Requires: T shall be MoveInsertable into *this and DefaultConstructible.

Postcondition: `sz == size()`.

Exceptions: Strong exception guarantee.

Complexity: Linear in the size of `*this` and `sz`.

void `size_type` ``default_init_t``

Effects: If `sz` is greater than the size of `*this`, additional value-initialized elements are inserted to the front. Invalidates iterators if reallocation is needed. If `sz` is smaller than than the size of `*this`, elements are popped from the front.

Requires: T shall be MoveInsertable into *this and default_initializable.

Postcondition: `sz == size()`.

Exceptions: Strong exception guarantee.

Complexity: Linear in the size of `*this` and `sz`.

void `size_type` `const T &`

Effects: If `sz` is greater than the size of `*this`, copies of `c` are inserted to the front. Invalidates iterators if reallocation is needed. If `sz` is smaller than than the size of `*this`, elements are popped from the front.

Postcondition: `sz == size()`.

Requires: `T` shall be CopyInsertable into `*this`.

Exceptions: Strong exception guarantee.

Complexity: Linear in the size of `*this` and `sz`.

void `size_type`

Effects: If `sz` is greater than the size of `*this`, additional value-initialized elements are inserted to the back. Invalidates iterators if reallocation is needed. If `sz` is smaller than than the size of `*this`, elements are popped from the back.

Requires: T shall be MoveInsertable into *this and DefaultConstructible.

Postcondition: `sz == size()`.

Exceptions: Strong exception guarantee.

Complexity: Linear in the size of `*this` and `sz`.

void `size_type` ``default_init_t``

Effects: If `sz` is greater than the size of `*this`, additional value-initialized elements are inserted to the back. Invalidates iterators if reallocation is needed. If `sz` is smaller than than the size of `*this`, elements are popped from the back.

Requires: T shall be MoveInsertable into *this and default initializable.

Postcondition: `sz == size()`.

Exceptions: Strong exception guarantee.

Complexity: Linear in the size of `*this` and `sz`.

void `size_type` `const T &`

Effects: If `sz` is greater than the size of `*this`, copies of `c` are inserted to the back. If `sz` is smaller than than the size of `*this`, elements are popped from the back.

Postcondition: `sz == size()`.

Requires: `T` shall be CopyInsertable into `*this`.

Exceptions: Strong exception guarantee.

Complexity: Linear in the size of `*this` and `sz`.

void `size_type`

Effects: Ensures that at least `n` elements can be inserted without requiring reallocation, where `n` is `new_capacity - size()`, if `n` is positive. Otherwise, there are no effects. Invalidates iterators if reallocation is needed.

Requires: `T` shall be MoveInsertable into `*this`.

Complexity: Linear in the size of *this.

Exceptions: Strong exception guarantee.

Throws: length_error if `new_capacity > max_size()`.

void `size_type`

Effects: Ensures that `n` elements can be pushed to the front without requiring reallocation, where `n` is `new_capacity - size()`, if `n` is positive. Otherwise, there are no effects. Invalidates iterators if reallocation is needed.

Requires: `T` shall be MoveInsertable into `*this`.

Complexity: Linear in the size of *this.

Exceptions: Strong exception guarantee.

Throws: `length_error` if `new_capacity > max_size()`.

void `size_type`

Effects: Ensures that `n` elements can be pushed to the back without requiring reallocation, where `n` is `new_capacity - size()`, if `n` is positive. Otherwise, there are no effects. Invalidates iterators if reallocation is needed.

Requires: `T` shall be MoveInsertable into `*this`.

Complexity: Linear in the size of *this.

Exceptions: Strong exception guarantee.

Throws: length_error if `new_capacity > max_size()`.

void

Effects: Reduces `capacity()` to `size()`. Invalidates iterators.

Requires: `T` shall be MoveInsertable into `*this`.

Exceptions: Strong exception guarantee.

Complexity: Linear in the size of *this.

reference `size_type`

Returns: A reference to the `n`th element in the devector.

Precondition: `n < size()`.

Complexity: Constant.

const_reference `size_type`

Returns: A constant reference to the `n`th element in the devector.

Precondition: `n < size()`.

Complexity: Constant.

iterator `size_type`

Requires: size() >= n.

Effects: Returns an iterator to the nth element from the beginning of the container. Returns end() if n == size().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

const_iterator `size_type`

Requires: size() >= n.

Effects: Returns a const_iterator to the nth element from the beginning of the container. Returns end() if n == size().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

size_type `iterator`

Requires: begin() <= p <= end().

Effects: Returns the index of the element pointed by p and size() if p == end().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

size_type `const_iterator`

Requires: begin() <= p <= end().

Effects: Returns the index of the element pointed by p and size() if p == end().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

reference `size_type`

Returns: A reference to the `n`th element in the devector.

Throws: `out_of_range`, if `n >= size()`.

Complexity: Constant.

const_reference `size_type`

Returns: A constant reference to the `n`th element in the devector.

Throws: `out_of_range`, if `n >= size()`.

Complexity: Constant.

reference

Returns: A reference to the first element in the devector.

Precondition: `!empty()`.

Complexity: Constant.

const_reference

Returns: A constant reference to the first element in the devector.

Precondition: `!empty()`.

Complexity: Constant.

reference

Returns: A reference to the last element in the devector.

Precondition: `!empty()`.

Complexity: Constant.

const_reference

Returns: A constant reference to the last element in the devector.

Precondition: `!empty()`.

Complexity: Constant.

T *

Returns: A pointer to the underlying array serving as element storage. The range `[data(); data() + size())` is always valid. For a non-empty devector, `data() == &front()`.

Complexity: Constant.

const T *

Returns: A constant pointer to the underlying array serving as element storage. The range `[data(); data() + size())` is always valid. For a non-empty devector, `data() == &front()`.

Complexity: Constant.

reference class... `Args &&...`

Effects: Pushes a new element to the front of the devector. The element is constructed in-place, using the perfect forwarded `args` as constructor arguments. Invalidates iterators if reallocation is needed. (`front_free_capacity() == 0`)

Requires: `T` shall be EmplaceConstructible from `args` and MoveInsertable into `*this`.

Exceptions: Strong exception guarantee.

Complexity: Amortized constant in the size of `*this`. (Constant, if `front_free_capacity() > 0`)

void `const T &`

Effects: Pushes the copy of `x` to the front of the devector. Invalidates iterators if reallocation is needed. (`front_free_capacity() == 0`)

Requires: `T` shall be CopyInsertable into `*this`.

Exceptions: Strong exception guarantee.

Complexity: Amortized constant in the size of `*this`. (Constant, if `front_free_capacity() > 0`)

void `T &&`

Effects: Move constructs a new element at the front of the devector using `x`. Invalidates iterators if reallocation is needed. (`front_free_capacity() == 0`)

Requires: `T` shall be MoveInsertable into `*this`.

Exceptions: Strong exception guarantee, not regarding the state of `x`.

Complexity: Amortized constant in the size of `*this`. (Constant, if `front_free_capacity() > 0`)

void

Effects: Removes the first element of `*this`.

Precondition: `!empty()`.

Postcondition: `front_free_capacity()` is incremented by 1.

Complexity: Constant.

reference class... `Args &&...`

Effects: Pushes a new element to the back of the devector. The element is constructed in-place, using the perfect forwarded `args` as constructor arguments. Invalidates iterators if reallocation is needed. (`back_free_capacity() == 0`)

Requires: `T` shall be EmplaceConstructible from `args` and MoveInsertable into `*this`, and MoveAssignable.

Exceptions: Strong exception guarantee.

Complexity: Amortized constant in the size of `*this`. (Constant, if `back_free_capacity() > 0`)

void `const T &` defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)

Effects: Pushes the copy of `x` to the back of the devector. Invalidates iterators if reallocation is needed. (`back_free_capacity() == 0`)

Requires: `T` shall be CopyInsertable into `*this`.

Exceptions: Strong exception guarantee.

Complexity: Amortized constant in the size of `*this`. (Constant, if `back_free_capacity() > 0`)

void `T &&`

Effects: Move constructs a new element at the back of the devector using `x`. Invalidates iterators if reallocation is needed. (`back_free_capacity() == 0`)

Requires: `T` shall be MoveInsertable into `*this`.

Exceptions: Strong exception guarantee, not regarding the state of `x`.

Complexity: Amortized constant in the size of `*this`. (Constant, if `back_free_capacity() > 0`)

void

Effects: Removes the last element of `*this`.

Precondition: `!empty()`.

Postcondition: `back_free_capacity()` is incremented by 1.

Complexity: Constant.

iterator class... `const_iterator` `Args &&...`

Effects: Constructs a new element before the element pointed by `position`. The element is constructed in-place, using the perfect forwarded `args` as constructor arguments. Invalidates iterators if reallocation is needed.

Requires: `T` shall be EmplaceConstructible, and MoveInsertable into `*this`, and MoveAssignable.

Returns: Iterator pointing to the newly constructed element.

Exceptions: Strong exception guarantee if `T` is `NothrowConstructible` and `NothrowAssignable`, Basic exception guarantee otherwise.

Complexity: Linear in the size of `*this`.

iterator `const_iterator` `const T &` defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)

Effects: Copy constructs a new element before the element pointed by `position`, using `x` as constructor argument. Invalidates iterators if reallocation is needed.

Requires: `T` shall be CopyInsertable into `*this` and and CopyAssignable.

Returns: Iterator pointing to the newly constructed element.

Exceptions: Strong exception guarantee if `T` is `NothrowConstructible` and `NothrowAssignable`, Basic exception guarantee otherwise.

Complexity: Linear in the size of `*this`.

iterator `const_iterator` `T &&`

Effects: Move constructs a new element before the element pointed by `position`, using `x` as constructor argument. Invalidates iterators if reallocation is needed.

Requires: `T` shall be MoveInsertable into `*this` and and CopyAssignable.

Returns: Iterator pointing to the newly constructed element.

Exceptions: Strong exception guarantee if `T` is `NothrowConstructible` and `NothrowAssignable` (not regarding the state of `x`), Basic exception guarantee otherwise.

Complexity: Linear in the size of `*this`.

iterator `const_iterator` `size_type` `const T &`

Effects: Copy constructs `n` elements before the element pointed by `position`, using `x` as constructor argument. Invalidates iterators if reallocation is needed.

Requires: `T` shall be CopyInsertable into `*this` and and CopyAssignable.

Returns: Iterator pointing to the first inserted element, or `position`, if `n` is zero.

Exceptions: Strong exception guarantee if `T` is `NothrowConstructible` and `NothrowAssignable`, Basic exception guarantee otherwise.

Complexity: Linear in the size of `*this` and `n`.

iterator `const_iterator` `InputIterator` `InputIterator last`

Effects: Copy constructs elements before the element pointed by position using each element in the range pointed by `first` and `last` as constructor arguments. Invalidates iterators if reallocation is needed.

Requires: `T` shall be EmplaceConstructible into `*this` from `*first`. If the specified iterator does not meet the forward iterator requirements, `T` shall also be MoveInsertable into `*this` and MoveAssignable.

Precondition: `first` and `last` are not iterators into `*this`.

Returns: Iterator pointing to the first inserted element, or `position`, if `first == last`.

Complexity: Linear in the size of `*this` and `N` (where `N` is the distance between `first` and `last`). Makes only `N` calls to the constructor of `T` and no reallocations if iterators `first` and `last` are of forward, bidirectional, or random access categories. It makes 2N calls to the copy constructor of `T` and `O(log(N)) reallocations if they are just input iterators.

Exceptions: Strong exception guarantee if `T` is `NothrowConstructible` and `NothrowAssignable`, Basic exception guarantee otherwise.

Remarks: Each iterator in the range `[first,last)` shall be dereferenced exactly once, unless an exception is thrown.

iterator `const_iterator` `std::initializer_list< T >`

Equivalent to: `insert(position, il.begin(), il.end())`

iterator `const_iterator`

Effects: Destroys the element pointed by `position` and removes it from the devector. Invalidates iterators.

Requires: `T` shall be MoveAssignable.

Precondition: `position` must be in the range of `[begin(), end())`.

Returns: Iterator pointing to the element immediately following the erased element prior to its erasure. If no such element exists, `end()` is returned.

Exceptions: Strong exception guarantee if `T` is `NothrowAssignable`, Basic exception guarantee otherwise.

Complexity: Linear in half the size of `*this`.

iterator `const_iterator` `const_iterator`

Effects: Destroys the range `[first,last)` and removes it from the devector. Invalidates iterators.

Requires: `T` shall be MoveAssignable.

Precondition: `[first,last)` must be in the range of `[begin(), end())`.

Returns: Iterator pointing to the element pointed to by `last` prior to any elements being erased. If no such element exists, `end()` is returned.

Exceptions: Strong exception guarantee if `T` is `NothrowAssignable`, Basic exception guarantee otherwise.

Complexity: Linear in half the size of `*this` plus the distance between `first` and `last`.

iterator `iterator` `iterator`

Effects: Destroys the range `[first,last)` and removes it from the devector. Invalidates iterators.

Requires: `T` shall be MoveAssignable.

Precondition: `[first,last)` must be in the range of `[begin(), end())`.

Returns: Iterator pointing to the element pointed to by `last` prior to any elements being erased. If no such element exists, `end()` is returned.

Exceptions: Strong exception guarantee if `T` is `NothrowAssignable`, Basic exception guarantee otherwise.

Complexity: Linear in half the size of `*this`.

void ``devector` &`

Effects: exchanges the contents of `*this` and `b`.

Requires: instances of `T` must be swappable by unqualified call of `swap` and `T` must be MoveInsertable into `*this`.

Precondition: The allocators should allow propagation or should compare equal.

Exceptions: Basic exceptions guarantee if not `noexcept`.

Complexity: Constant.

void

Effects: Destroys all elements in the devector. Invalidates all references, pointers and iterators to the elements of the devector.

Postcondition: `empty() && front_free_capacity() == 0 && back_free_capacity() == old capacity`.

Complexity: Linear in the size of `*this`.

Remarks: Does not free memory.

void ``devector` &&` `dtl::bool_< true >`
void ``devector` &&` `dtl::bool_< false >`
size_type `const_iterator`
bool `const_iterator`
size_type
size_type
iterator `const_iterator`
growth_factor_60

A portable metafunction to obtain a vector that uses a polymorphic allocator

`boost::container::devector`< T, GrowthPolicy, `polymorphic_allocator`< T > >
`boost::container::devector`< T, GrowthPolicy, `polymorphic_allocator`< T > >

is the key_type of the map

std::less<Key>

is the ordering function for Keys (e.g. std::less<Key>).

new_allocator< std::pair< Key, T> >

is either:

- The allocator to allocate `value_type`s (e.g. allocator< std::pair<Key, T> > ). (in this case sequence_type will be vector<value_type, AllocatorOrContainer>)

- The SequenceContainer to be used as the underlying sequence_type. It must be a vector-like sequence container with random-access iterators.

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)

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.

InputIterator
InputIterator

Effects: 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.

InputIterator
InputIterator
const 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.

InputIterator
InputIterator
const 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.

InputIterator
InputIterator
const 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_t
InputIterator
InputIterator

Effects: 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_t
InputIterator
InputIterator
const 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_t
InputIterator
InputIterator
const 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_t
InputIterator
InputIterator
const 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_t
std::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_t
std::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_t
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 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
allocator_type

Effects: Returns a copy of the allocator that was passed to the object's constructor.

Complexity: Constant.

get_stored_allocator_noconst_return_t

Effects: Returns a reference to the internal allocator.

Throws: Nothing

Complexity: Constant.

Note: Non-standard extension.

get_stored_allocator_const_return_t

Effects: Returns a reference to the internal allocator.

Throws: Nothing

Complexity: Constant.

Note: Non-standard extension.

iterator

Effects: Returns an iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant.

iterator

Effects: Returns an iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

bool

Effects: Returns true if the container contains no elements.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the number of the elements contained in the container.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the largest possible size of the container.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Number of elements for which memory has been allocated. capacity() is always greater than or equal to size().

Throws: Nothing.

Complexity: Constant.

void `size_type`

Effects: 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.

void Effects: 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 search time plus linear insertion time in case no equivalent key is present.

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 search time plus linear insertion time in case no equivalent key is present.

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 search time plus linear insertion time in case no equivalent key is present.

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.

iterator `const_iterator` `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)) 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.

iterator `const_iterator` `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)) 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.

iterator `size_type`

Requires: size() >= n.

Effects: Returns an iterator to the nth element from the beginning of the container. Returns end() if n == size().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

const_iterator `size_type`

Requires: size() >= n.

Effects: Returns a const_iterator to the nth element from the beginning of the container. Returns end() if n == size().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

size_type `iterator`

Requires: begin() <= p <= end().

Effects: Returns the index of the element pointed by p and size() if p == end().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

size_type `const_iterator`

Requires: begin() <= p <= end().

Effects: Returns the index of the element pointed by p and size() if p == end().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

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 > class... `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.

iterator class... `const_iterator` `Args &&...`

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 > class... `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.

iterator class... `const_iterator` `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 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 > class... `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 search time plus linear insertion time in case the key is not present.

iterator class... `const_iterator` `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 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. Linear insertion time in case no equivalent key is present.

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 BOOST_MOVE_I bool > `Pair &&`

Effects: Inserts a new value_type 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.

iterator `const_iterator` `const 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.

iterator `const_iterator` `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.

iterator `const_iterator` `Pair &&`

Effects: Inserts an element 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.

void `InputIterator` `InputIterator`

Requires: 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.

void ``ordered_unique_range_t`` `InputIterator` `InputIterator`

Requires: 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.

void `std::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.

void ``ordered_unique_range_t`` `std::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.

void ``flat_map`< Key, T, C2, AllocatorOrContainer > &`

Requires: this->get_allocator() == source.get_allocator().

Effects: Move-inserts each element from source into *this 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 moved from source.

Complexity: Linear in this->size() + source.size().

Note: Invalidates all iterators and references.

void ``flat_map`< Key, T, C2, AllocatorOrContainer > &&`

Requires: this->get_allocator() == source.get_allocator().

Effects: Move-inserts each element from source into *this 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 moved from source.

Complexity: Linear in this->size() + source.size().

Note: Invalidates all iterators and references.

void ``flat_multimap`< Key, T, C2, AllocatorOrContainer > &`

Requires: this->get_allocator() == source.get_allocator().

Effects: Move-inserts each element from source into *this 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 moved from source.

Complexity: Linear in this->size() + source.size().

Note: Invalidates all iterators and references.

void ``flat_multimap`< Key, T, C2, AllocatorOrContainer > &&`

Requires: this->get_allocator() == source.get_allocator().

Effects: Move-inserts each element from source into *this 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 moved from source.

Complexity: Linear in this->size() + source.size().

Note: Invalidates all iterators and references.

iterator `const_iterator`

Effects: Erases the element pointed to by p.

Returns: Returns an iterator pointing to the element immediately following q prior to the element being erased. If no such element exists, returns end().

Complexity: Linear to the elements with keys bigger than p

Note: Invalidates elements with keys not less than the erased element.

size_type `const key_type &`

Effects: If present, erases the element in the container with key equivalent to x.

Returns: Returns the number of erased elements (0/1).

Complexity: Logarithmic search time plus erasure time linear to the elements with bigger keys.

size_type `const K &`

Requires: This overload is available only if key_compare::is_transparent exists.

Effects: If present, erases the element in the container with key equivalent to x.

Returns: Returns the number of erased elements (0/1).

iterator `const_iterator` `const_iterator`

Effects: 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.

void ``flat_map` &`

Effects: Swaps the contents of *this and x.

Throws: Nothing.

Complexity: Constant.

void

Effects: erase(begin(),end()).

Postcondition: size() == 0.

Complexity: linear in size().

key_compare

Effects: Returns the comparison object out of which a was constructed.

Complexity: Constant.

value_compare

Effects: Returns an object of value_compare constructed out of the comparison object.

Complexity: Constant.

iterator `const 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_iterator `const 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.

iterator `const 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_iterator `const 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_type `const key_type &`

Returns: The number of elements with key equivalent to x.

Complexity: log(size())+count(k)

size_type `const 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)

bool `const key_type &`

Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.

Complexity: log(size()).

bool `const 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()).

iterator `const 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_iterator `const 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.

iterator `const 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_iterator `const 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.

iterator `const 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_iterator `const 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.

iterator `const 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_iterator `const 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_type

Effects: 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

void `sequence_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

void ``ordered_unique_range_t`` `sequence_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

const sequence_type &

Effects: Returns a const view of the underlying sequence.

Complexity: Constant

Throws: Nothing

bool `const `flat_map` &` `const `flat_map` &`

Effects: Returns true if x and y are equal

Complexity: Linear to the number of elements in the container.

bool `const `flat_map` &` `const `flat_map` &`

Effects: Returns true if x and y are unequal

Complexity: Linear to the number of elements in the container.

bool `const `flat_map` &` `const `flat_map` &`

Effects: Returns true if x is less than y

Complexity: Linear to the number of elements in the container.

bool `const `flat_map` &` `const `flat_map` &`

Effects: Returns true if x is greater than y

Complexity: Linear to the number of elements in the container.

bool `const `flat_map` &` `const `flat_map` &`

Effects: Returns true if x is equal or less than y

Complexity: Linear to the number of elements in the container.

bool `const `flat_map` &` `const `flat_map` &`

Effects: Returns true if x is equal or greater than y

Complexity: Linear to the number of elements in the container.

void ``flat_map` &` ``flat_map` &`

Effects: x.swap(y)

Complexity: Constant.

is the key_type of the map

std::less<Key>

is the ordering function for Keys (e.g. std::less<Key>).

new_allocator< std::pair< Key, T> >

is either:

- The allocator to allocate `value_type`s (e.g. allocator< std::pair<Key, T> > ). (in this case sequence_type will be vector<value_type, AllocatorOrContainer>)

- The SequenceContainer to be used as the underlying sequence_type. It must be a vector-like sequence container with random-access iterators.

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)

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.

InputIterator
InputIterator

Effects: 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.

InputIterator
InputIterator
const 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.

InputIterator
InputIterator
const 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.

InputIterator
InputIterator
const 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_t
InputIterator
InputIterator

Effects: 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_t
InputIterator
InputIterator
const 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_t
InputIterator
InputIterator
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 [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_t
InputIterator
InputIterator
const 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_t
std::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_t
std::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_t
std::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 *this

Complexity: Linear in il.size().

allocator_type

Effects: 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: Nothing

Complexity: Constant.

Note: Non-standard extension.

const stored_allocator_type &

Effects: Returns a reference to the internal allocator.

Throws: Nothing

Complexity: Constant.

Note: Non-standard extension.

iterator

Effects: Returns an iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant.

iterator

Effects: Returns an iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

bool

Effects: Returns true if the container contains no elements.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the number of the elements contained in the container.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the largest possible size of the container.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Number of elements for which memory has been allocated. capacity() is always greater than or equal to size().

Throws: Nothing.

Complexity: Constant.

void `size_type`

Effects: 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.

void Effects: Tries to deallocate the excess of memory created

Throws: If memory allocation throws, or T's copy constructor throws.

Complexity: Linear to size().

iterator `size_type`

Requires: size() >= n.

Effects: Returns an iterator to the nth element from the beginning of the container. Returns end() if n == size().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

const_iterator `size_type`

Requires: size() >= n.

Effects: Returns a const_iterator to the nth element from the beginning of the container. Returns end() if n == size().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

size_type `iterator`

Requires: begin() <= p <= end().

Effects: Returns the index of the element pointed by p and size() if p == end().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

size_type `const_iterator`

Requires: begin() <= p <= end().

Effects: Returns the index of the element pointed by p and size() if p == end().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

iterator class... `Args &&...`

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.

iterator class... `const_iterator` `Args &&...`

Effects: Inserts an object of type T constructed with std::forward<Args>(args)... in the container. p is a hint pointing to where the insert should start to search.

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

Complexity: Logarithmic 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.

iterator `const 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.

iterator `Pair &&`

Effects: Inserts a new value 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.

iterator `const_iterator` `const 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.

iterator `const_iterator` `Pair &&`

Effects: Inserts a 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 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.

void `InputIterator` `InputIterator`

Requires: 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.

void ``ordered_range_t`` `InputIterator` `InputIterator`

Requires: 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.

void `std::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.

void ``ordered_range_t`` `std::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.

void ``flat_multimap`< Key, T, C2, AllocatorOrContainer > &`

Requires: this->get_allocator() == source.get_allocator().

Effects: Move-inserts each element from source into *this a using the comparison object of *this.

Complexity: Linear in this->size() + source.size().

Note: Invalidates all iterators and references.

void ``flat_multimap`< Key, T, C2, AllocatorOrContainer > &&`

Requires: this->get_allocator() == source.get_allocator().

Effects: Move-inserts each element from source into *this a using the comparison object of *this.

Complexity: Linear in this->size() + source.size().

Note: Invalidates all iterators and references.

void ``flat_map`< Key, T, C2, AllocatorOrContainer > &`

Requires: this->get_allocator() == source.get_allocator().

Effects: Move-inserts each element from source into *this a using the comparison object of *this.

Complexity: Linear in this->size() + source.size().

Note: Invalidates all iterators and references.

void ``flat_map`< Key, T, C2, AllocatorOrContainer > &&`

Requires: this->get_allocator() == source.get_allocator().

Effects: Move-inserts each element from source into *this a using the comparison object of *this.

Complexity: Linear in this->size() + source.size().

Note: Invalidates all iterators and references.

iterator `const_iterator`

Effects: Erases the element pointed to by p.

Returns: Returns an iterator pointing to the element immediately following q prior to the element being erased. If no such element exists, returns end().

Complexity: Linear to the elements with keys bigger than p

Note: Invalidates elements with keys not less than the erased element.

size_type `const 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.

size_type `const K &`

Requires: This overload is available only if key_compare::is_transparent exists.

Effects: Erases all elements in the container with key equivalent to x.

Returns: Returns the number of erased elements.

iterator `const_iterator` `const_iterator`

Effects: 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.

void ``flat_multimap` &`

Effects: Swaps the contents of *this and x.

Throws: Nothing.

Complexity: Constant.

void

Effects: erase(begin(),end()).

Postcondition: size() == 0.

Complexity: linear in size().

key_compare

Effects: Returns the comparison object out of which a was constructed.

Complexity: Constant.

value_compare

Effects: Returns an object of value_compare constructed out of the comparison object.

Complexity: Constant.

iterator `const 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_iterator `const 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.

iterator `const 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_iterator `const 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_type `const key_type &`

Returns: The number of elements with key equivalent to x.

Complexity: log(size())+count(k)

size_type `const 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)

bool `const key_type &`

Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.

Complexity: log(size()).

bool `const 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()).

iterator `const 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_iterator `const 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

iterator `const 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_iterator `const 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

iterator `const 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_iterator `const 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

iterator `const 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_iterator `const 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_type

Effects: 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

void `sequence_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

void ``ordered_range_t`` `sequence_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

const sequence_type &

Effects: Returns a const view of the underlying sequence.

Complexity: Constant

Throws: Nothing

bool `const `flat_multimap` &` `const `flat_multimap` &`

Effects: Returns true if x and y are equal

Complexity: Linear to the number of elements in the container.

bool `const `flat_multimap` &` `const `flat_multimap` &`

Effects: Returns true if x and y are unequal

Complexity: Linear to the number of elements in the container.

bool `const `flat_multimap` &` `const `flat_multimap` &`

Effects: Returns true if x is less than y

Complexity: Linear to the number of elements in the container.

bool `const `flat_multimap` &` `const `flat_multimap` &`

Effects: Returns true if x is greater than y

Complexity: Linear to the number of elements in the container.

bool `const `flat_multimap` &` `const `flat_multimap` &`

Effects: Returns true if x is equal or less than y

Complexity: Linear to the number of elements in the container.

bool `const `flat_multimap` &` `const `flat_multimap` &`

Effects: Returns true if x is equal or greater than y

Complexity: Linear to the number of elements in the container.

void ``flat_multimap` &` ``flat_multimap` &`

Effects: x.swap(y)

Complexity: Constant.

InputIterator
InputIterator
InputIterator
InputIterator
AllocatorOrCompare const &
dtl::require_nonallocator_t<Compare>
dtl::require_allocator_t<Allocator>
InputIterator
InputIterator
Compare const &
Allocator const &
ordered_unique_range_t
InputIterator
InputIterator
ordered_unique_range_t
InputIterator
InputIterator
AllocatorOrCompare const &
dtl::require_nonallocator_t<Compare>
dtl::require_allocator_t<Allocator>
ordered_unique_range_t
InputIterator
InputIterator
Compare const &
Allocator const &
InputIterator
InputIterator
InputIterator
InputIterator
AllocatorOrCompare const &
dtl::require_nonallocator_t<Compare>
dtl::require_allocator_t<Allocator>
InputIterator
InputIterator
Compare const &
Allocator const &
ordered_range_t
InputIterator
InputIterator
ordered_range_t
InputIterator
InputIterator
AllocatorOrCompare const &
dtl::require_nonallocator_t<Compare>
dtl::require_allocator_t<Allocator>
ordered_range_t
InputIterator
InputIterator
Compare const &
Allocator const &
std::less<Key>

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 > > >
std::less<Key>

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 > > >

is the type to be inserted in the multiset, which is also the key_type

std::less<Key>

is the comparison functor used to order keys

new_allocator<Key>

is either:

- The allocator to allocate `value_type`s (e.g. allocator< std::pair<Key, T> > ). (in this case sequence_type will be vector<value_type, AllocatorOrContainer>)

- The SequenceContainer to be used as the underlying sequence_type. It must be a vector-like sequence container with random-access iterators.

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

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.

InputIterator
InputIterator

Effects: 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.

InputIterator
InputIterator
const 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.

InputIterator
InputIterator
const 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.

InputIterator
InputIterator
const 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_t
InputIterator
InputIterator

Effects: 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_t
InputIterator
InputIterator
const 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_t
InputIterator
InputIterator
const 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_t
InputIterator
InputIterator
const 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_t
std::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_t
std::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_t
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 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().

allocator_type

Effects: 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: Nothing

Complexity: Constant.

Note: Non-standard extension.

const stored_allocator_type &

Effects: Returns a reference to the internal allocator.

Throws: Nothing

Complexity: Constant.

Note: Non-standard extension.

iterator

Effects: Returns an iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant.

iterator

Effects: Returns an iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

bool

Effects: Returns true if the container contains no elements.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the number of the elements contained in the container.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the largest possible size of the container.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Number of elements for which memory has been allocated. capacity() is always greater than or equal to size().

Throws: Nothing.

Complexity: Constant.

void `size_type`

Effects: 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.

void Effects: Tries to deallocate the excess of memory created

Throws: If memory allocation throws, or Key's copy constructor throws.

Complexity: Linear to size().

iterator class... `Args &&...`

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.

iterator class... `const_iterator` `Args &&...`

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.

iterator `const 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.

iterator `value_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.

iterator `const_iterator` `const 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.

iterator `const_iterator` `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 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.

void `InputIterator` `InputIterator`

Requires: 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.

void ``ordered_range_t`` `InputIterator` `InputIterator`

Requires: 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.

void `std::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.

void ``ordered_range_t`` `std::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.

void ``flat_multiset`< Key, C2, AllocatorOrContainer > &`

Requires: this->get_allocator() == source.get_allocator().

Effects: Move-inserts each element from source into *this a using the comparison object of *this.

Complexity: Linear in this->size() + source.size().

Note: Invalidates all iterators and references.

void ``flat_multiset`< Key, C2, AllocatorOrContainer > &&`

Requires: this->get_allocator() == source.get_allocator().

Effects: Move-inserts each element from source into *this a using the comparison object of *this.

Complexity: Linear in this->size() + source.size().

Note: Invalidates all iterators and references.

void ``flat_set`< Key, C2, AllocatorOrContainer > &`

Requires: this->get_allocator() == source.get_allocator().

Effects: Move-inserts each element from source into *this a using the comparison object of *this.

Complexity: Linear in this->size() + source.size().

Note: Invalidates all iterators and references.

void ``flat_set`< Key, C2, AllocatorOrContainer > &&`

Requires: this->get_allocator() == source.get_allocator().

Effects: Move-inserts each element from source into *this a using the comparison object of *this.

Complexity: Linear in this->size() + source.size().

Note: Invalidates all iterators and references.

iterator `const_iterator`

Effects: Erases the element pointed to by p.

Returns: Returns an iterator pointing to the element immediately following q prior to the element being erased. If no such element exists, returns end().

Complexity: Linear to the elements with keys bigger than p

Note: Invalidates elements with keys not less than the erased element.

size_type `const key_type &`

Effects: If present, erases the element in the container with key equivalent to x.

Returns: Returns the number of erased elements (0/1).

Complexity: Logarithmic search time plus erasure time linear to the elements with bigger keys.

iterator `const_iterator` `const_iterator`

Effects: 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.

void ``flat_multiset` &`

Effects: Swaps the contents of *this and x.

Throws: Nothing.

Complexity: Constant.

void

Effects: erase(begin(),end()).

Postcondition: size() == 0.

Complexity: linear in size().

key_compare

Effects: Returns the comparison object out of which a was constructed.

Complexity: Constant.

value_compare

Effects: Returns an object of value_compare constructed out of the comparison object.

Complexity: Constant.

iterator `const 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_iterator `const 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.

iterator `size_type`

Requires: size() >= n.

Effects: Returns an iterator to the nth element from the beginning of the container. Returns end() if n == size().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

const_iterator `size_type`

Requires: size() >= n.

Effects: Returns a const_iterator to the nth element from the beginning of the container. Returns end() if n == size().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

size_type `iterator`

Requires: begin() <= p <= end().

Effects: Returns the index of the element pointed by p and size() if p == end().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

size_type `const_iterator`

Requires: begin() <= p <= end().

Effects: Returns the index of the element pointed by p and size() if p == end().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

size_type `const key_type &`

Returns: The number of elements with key equivalent to x.

Complexity: log(size())+count(k)

bool `const key_type &`

Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.

Complexity: log(size()).

bool `const 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()).

iterator `const 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_iterator `const 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

iterator `const 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_iterator `const 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_type

Effects: 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

void `sequence_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

void ``ordered_range_t`` `sequence_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

const sequence_type &

Effects: Returns a const view of the underlying sequence.

Complexity: Constant

Throws: Nothing

bool `const `flat_multiset` &` `const `flat_multiset` &`

Effects: Returns true if x and y are equal

Complexity: Linear to the number of elements in the container.

bool `const `flat_multiset` &` `const `flat_multiset` &`

Effects: Returns true if x and y are unequal

Complexity: Linear to the number of elements in the container.

bool `const `flat_multiset` &` `const `flat_multiset` &`

Effects: Returns true if x is less than y

Complexity: Linear to the number of elements in the container.

bool `const `flat_multiset` &` `const `flat_multiset` &`

Effects: Returns true if x is greater than y

Complexity: Linear to the number of elements in the container.

bool `const `flat_multiset` &` `const `flat_multiset` &`

Effects: Returns true if x is equal or less than y

Complexity: Linear to the number of elements in the container.

bool `const `flat_multiset` &` `const `flat_multiset` &`

Effects: Returns true if x is equal or greater than y

Complexity: Linear to the number of elements in the container.

void ``flat_multiset` &` ``flat_multiset` &`

Effects: x.swap(y)

Complexity: Constant.

is the type to be inserted in the set, which is also the key_type

std::less<Key>

is the comparison functor used to order keys

new_allocator<Key>

is either:

- The allocator to allocate `value_type`s (e.g. allocator< std::pair<Key, T> > ). (in this case sequence_type will be vector<value_type, AllocatorOrContainer>)

- The SequenceContainer to be used as the underlying sequence_type. It must be a vector-like sequence container with random-access iterators.

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

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.

InputIterator
InputIterator

Effects: 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.

InputIterator
InputIterator
const 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.

InputIterator
InputIterator
const 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.

InputIterator
InputIterator
const 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_t
InputIterator
InputIterator

Effects: 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_t
InputIterator
InputIterator
const 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_t
InputIterator
InputIterator
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 [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_t
InputIterator
InputIterator
const 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_t
std::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_t
std::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_t
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 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().

allocator_type

Effects: 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: Nothing

Complexity: Constant.

Note: Non-standard extension.

const stored_allocator_type &

Effects: Returns a reference to the internal allocator.

Throws: Nothing

Complexity: Constant.

Note: Non-standard extension.

iterator

Effects: Returns an iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant.

iterator

Effects: Returns an iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

bool

Effects: Returns true if the container contains no elements.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the number of the elements contained in the container.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the largest possible size of the container.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Number of elements for which memory has been allocated. capacity() is always greater than or equal to size().

Throws: Nothing.

Complexity: Constant.

void `size_type`

Effects: 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.

void Effects: 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 > class... `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.

iterator class... `const_iterator` `Args &&...`

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.

iterator `const_iterator` `const 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.

iterator `const_iterator` `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.

void `InputIterator` `InputIterator`

Requires: 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.

void ``ordered_unique_range_t`` `InputIterator` `InputIterator`

Requires: 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.

void `std::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.

void ``ordered_unique_range_t`` `std::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.

void ``flat_set`< Key, C2, AllocatorOrContainer > &`

Requires: this->get_allocator() == source.get_allocator().

Effects: Move-inserts each element from source into *this 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 moved from source.

Complexity: Linear in this->size() + source.size().

Note: Invalidates all iterators and references.

void ``flat_set`< Key, C2, AllocatorOrContainer > &&`

Requires: this->get_allocator() == source.get_allocator().

Effects: Move-inserts each element from source into *this 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 moved from source.

Complexity: Linear in this->size() + source.size().

Note: Invalidates all iterators and references.

void ``flat_multiset`< Key, C2, AllocatorOrContainer > &`

Requires: this->get_allocator() == source.get_allocator().

Effects: Move-inserts each element from source into *this 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 moved from source.

Complexity: Linear in this->size() + source.size().

Note: Invalidates all iterators and references.

void ``flat_multiset`< Key, C2, AllocatorOrContainer > &&`

Requires: this->get_allocator() == source.get_allocator().

Effects: Move-inserts each element from source into *this 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 moved from source.

Complexity: Linear in this->size() + source.size().

Note: Invalidates all iterators and references.

size_type `const key_type &`

Effects: If present, erases the element in the container with key equivalent to x.

Returns: Returns the number of erased elements (0/1).

Complexity: Logarithmic search time plus erasure time linear to the elements with bigger keys.

iterator `const_iterator`

Effects: Erases the element pointed to by p.

Returns: Returns an iterator pointing to the element immediately following q prior to the element being erased. If no such element exists, returns end().

Complexity: Linear to the elements with keys bigger than p

Note: Invalidates elements with keys not less than the erased element.

iterator `const_iterator` `const_iterator`

Effects: 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.

void ``flat_set` &`

Effects: Swaps the contents of *this and x.

Throws: Nothing.

Complexity: Constant.

void

Effects: erase(begin(),end()).

Postcondition: size() == 0.

Complexity: linear in size().

key_compare

Effects: Returns the comparison object out of which a was constructed.

Complexity: Constant.

value_compare

Effects: Returns an object of value_compare constructed out of the comparison object.

Complexity: Constant.

iterator `const 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_iterator `const 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.

iterator `const 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_iterator `const 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.

iterator `size_type`

Requires: size() >= n.

Effects: Returns an iterator to the nth element from the beginning of the container. Returns end() if n == size().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

const_iterator `size_type`

Requires: size() >= n.

Effects: Returns a const_iterator to the nth element from the beginning of the container. Returns end() if n == size().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

size_type `iterator`

Requires: begin() <= p <= end().

Effects: Returns the index of the element pointed by p and size() if p == end().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

size_type `const_iterator`

Requires: begin() <= p <= end().

Effects: Returns the index of the element pointed by p and size() if p == end().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

size_type `const key_type &`

Returns: The number of elements with key equivalent to x.

Complexity: log(size())+count(k)

size_type `const 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)

bool `const key_type &`

Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.

Complexity: log(size()).

bool `const 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()).

iterator `const 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_iterator `const 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

iterator `const 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_iterator `const 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

iterator `const 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_iterator `const 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

iterator `const 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_iterator `const 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_type

Effects: Extracts the internal sequence container.

Complexity: Same as the move constructor of sequence_type, usually constant.

Postcondition: this->empty()

Throws: If sequence_type's move constructor throws

void `sequence_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

void ``ordered_unique_range_t`` `sequence_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

const sequence_type &

Effects: Returns a const view of the underlying sequence.

Complexity: Constant

Throws: Nothing

bool `const `flat_set` &` `const `flat_set` &`

Effects: Returns true if x and y are equal

Complexity: Linear to the number of elements in the container.

bool `const `flat_set` &` `const `flat_set` &`

Effects: Returns true if x and y are unequal

Complexity: Linear to the number of elements in the container.

bool `const `flat_set` &` `const `flat_set` &`

Effects: Returns true if x is less than y

Complexity: Linear to the number of elements in the container.

bool `const `flat_set` &` `const `flat_set` &`

Effects: Returns true if x is greater than y

Complexity: Linear to the number of elements in the container.

bool `const `flat_set` &` `const `flat_set` &`

Effects: Returns true if x is equal or less than y

Complexity: Linear to the number of elements in the container.

bool `const `flat_set` &` `const `flat_set` &`

Effects: Returns true if x is equal or greater than y

Complexity: Linear to the number of elements in the container.

void ``flat_set` &` ``flat_set` &`

Effects: x.swap(y)

Complexity: Constant.

InputIterator
InputIterator
InputIterator
InputIterator
AllocatorOrCompare const &
dtl::require_nonallocator_t<Compare>
dtl::require_allocator_t<Allocator>
InputIterator
InputIterator
Compare const &
Allocator const &
ordered_unique_range_t
InputIterator
InputIterator
ordered_unique_range_t
InputIterator
InputIterator
AllocatorOrCompare const &
dtl::require_nonallocator_t<Compare>
dtl::require_allocator_t<Allocator>
ordered_unique_range_t
InputIterator
InputIterator
Compare const &
Allocator const &
InputIterator
InputIterator
InputIterator
InputIterator
AllocatorOrCompare const &
dtl::require_nonallocator_t<Compare>
dtl::require_allocator_t<Allocator>
InputIterator
InputIterator
Compare const &
Allocator const &
ordered_range_t
InputIterator
InputIterator
ordered_range_t
InputIterator
InputIterator
AllocatorOrCompare const &
dtl::require_nonallocator_t<Compare>
dtl::require_allocator_t<Allocator>
ordered_range_t
InputIterator
InputIterator
Compare const &
Allocator const &
std::less<Key>

A portable metafunction to obtain a flat_multiset that uses a polymorphic allocator

`boost::container::flat_multiset`< Key, Compare, `polymorphic_allocator`< Key > >
std::less<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 > >

The type of object that is stored in the list

void

The allocator used for all internal memory management, use void for the default allocator

dtl::node_alloc_holder< real_allocator< T, void >::type, dtl::intrusive_list_type< real_allocator< T, void >::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

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: Nothing

Complexity: Constant.

size_type

Effects: 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_type
const 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_type
const 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.

InpIt
InpIt
const 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.

void `size_type` `const 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.

void `InpIt` `InpIt`

Effects: Assigns the range [first, last) to *this.

Throws: If memory allocation throws or T's constructor from dereferencing InpIt throws.

Complexity: Linear to n.

void `std::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_type

Effects: 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: Nothing

Complexity: Constant.

Note: Non-standard extension.

const stored_allocator_type &

Effects: Returns a reference to the internal allocator.

Throws: Nothing

Complexity: Constant.

Note: Non-standard extension.

iterator

Effects: Returns an iterator to the first element contained in the list.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the list.

Throws: Nothing.

Complexity: Constant.

iterator

Effects: Returns an iterator to the end of the list.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the list.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the beginning of the reversed list.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed list.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the end of the reversed list.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed list.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the list.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the list.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed list.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed list.

Throws: Nothing.

Complexity: Constant.

bool

Effects: Returns true if the list contains no elements.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the number of the elements contained in the list.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the largest possible size of the list.

Throws: Nothing.

Complexity: Constant.

void `size_type`

Effects: Inserts or erases elements at the end such that the size becomes n. New elements are value initialized.

Throws: If memory allocation throws, or T's copy constructor throws.

Complexity: Linear to the difference between size() and new_size.

void `size_type` `const 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.

reference

Requires: !empty()

Effects: Returns a reference to the first element from the beginning of the container.

Throws: Nothing.

Complexity: Constant.

const_reference

Requires: !empty()

Effects: Returns a const reference to the first element from the beginning of the container.

Throws: Nothing.

Complexity: Constant.

reference

Requires: !empty()

Effects: Returns a reference to the first element from the beginning of the container.

Throws: Nothing.

Complexity: Constant.

const_reference

Requires: !empty()

Effects: Returns a const reference to the first element from the beginning of the container.

Throws: Nothing.

Complexity: Constant.

reference class... `Args &&...`

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

reference class... `Args &&...`

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

iterator class... `const_iterator` `Args &&...`

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

void `const 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.

void `T &&`

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.

void `const 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.

void `T &&`

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.

iterator `const_iterator` `const 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.

iterator `const_iterator` `T &&`

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.

iterator `const_iterator` `size_type` `const 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.

iterator `const_iterator` `InpIt` `InpIt`

Requires: 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).

iterator `const_iterator` `std::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()).

void

Effects: Removes the first element from the list.

Throws: Nothing.

Complexity: Amortized constant time.

void

Effects: Removes the last element from the list.

Throws: Nothing.

Complexity: Amortized constant time.

iterator `const_iterator`

Requires: p must be a valid iterator of *this.

Effects: Erases the element at p.

Throws: Nothing.

Complexity: Amortized constant time.

iterator `const_iterator` `const_iterator`

Requires: 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.

void ``list` &`

Effects: Swaps the contents of *this and x.

Throws: Nothing.

Complexity: Constant.

void

Effects: Erases all the elements of the list.

Throws: Nothing.

Complexity: Linear to the number of elements in the list.

void `const_iterator` ``list` &`

Requires: p must point to an element contained by the list. x != *this. this' allocator and x's allocator shall compare equal

Effects: 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: Nothing

Complexity: 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.

void `const_iterator` ``list` &&`

Requires: p must point to an element contained by the list. x != *this. this' allocator and x's allocator shall compare equal

Effects: 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: Nothing

Complexity: 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.

void `const_iterator` ``list` &` `const_iterator`

Requires: 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: Nothing

Complexity: 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.

void `const_iterator` ``list` &&` `const_iterator`

Requires: 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: Nothing

Complexity: 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.

void `const_iterator` ``list` &` `const_iterator` `const_iterator`

Requires: 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: Nothing

Complexity: 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.

void `const_iterator` ``list` &&` `const_iterator` `const_iterator`

Requires: 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: Nothing

Complexity: 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.

void `const_iterator` ``list` &` `const_iterator` `const_iterator` `size_type`

Requires: 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 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: Nothing

Complexity: 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

void `const_iterator` ``list` &&` `const_iterator` `const_iterator` `size_type`

Requires: 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 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: Nothing

Complexity: 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

void `const 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.

void `Pred`

Effects: 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.

void

Effects: 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.

void `BinaryPredicate`

Effects: 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.

void ``list` &`

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.

void ``list` &&`

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.

void ``list` &` `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.

void ``list` &&` `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.

void

Effects: 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.

void `StrictWeakOrdering`

Effects: 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.

void

Effects: Reverses the order of elements in the list.

Throws: Nothing.

Complexity: This function is linear time.

Note: Iterators and references are not invalidated

bool `const `list` &` `const `list` &`

Effects: Returns true if x and y are equal

Complexity: Linear to the number of elements in the container.

bool `const `list` &` `const `list` &`

Effects: Returns true if x and y are unequal

Complexity: Linear to the number of elements in the container.

bool `const `list` &` `const `list` &`

Effects: Returns true if x is less than y

Complexity: Linear to the number of elements in the container.

bool `const `list` &` `const `list` &`

Effects: Returns true if x is greater than y

Complexity: Linear to the number of elements in the container.

bool `const `list` &` `const `list` &`

Effects: Returns true if x is equal or less than y

Complexity: Linear to the number of elements in the container.

bool `const `list` &` `const `list` &`

Effects: Returns true if x is equal or greater than y

Complexity: Linear to the number of elements in the container.

void ``list` &` ``list` &`

Effects: x.swap(y)

Complexity: Constant.

InputIterator
InputIterator
InputIterator
InputIterator
ValueAllocator 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 > >

is the key_type of the map

is the `mapped_type`

std::less<Key>

is the ordering function for Keys (e.g. std::less<Key>).

void

is the allocator to allocate the `value_type`s (e.g. allocator< std::pair<const Key, T> > ).

tree_assoc_defaults

is an packed option type generated using using boost::container::tree_assoc_options.

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
implementation_defined
implementation_defined
implementation_defined
(dtl::is_same< typename allocator_type::value_type, std::pair< const Key, T > >::value)

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.

InputIterator
InputIterator

Effects: 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.

InputIterator
InputIterator
const 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.

InputIterator
InputIterator
const 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.

InputIterator
InputIterator
const 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_t
InputIterator
InputIterator

Effects: 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_t
InputIterator
InputIterator
const 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_t
InputIterator
InputIterator
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 [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_t
InputIterator
InputIterator
const 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_t
std::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_t
std::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_t
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 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.

allocator_type

Effects: 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: Nothing

Complexity: Constant.

Note: Non-standard extension.

const stored_allocator_type &

Effects: Returns a reference to the internal allocator.

Throws: Nothing

Complexity: Constant.

Note: Non-standard extension.

iterator

Effects: Returns an iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant.

iterator

Effects: Returns an iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

bool

Effects: Returns true if the container contains no elements.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the number of the elements contained in the container.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: 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.

iterator `const_iterator` `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)) 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.

iterator `const_iterator` `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)) 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 > `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.

std::pair< iterator BOOST_MOVE_I bool > `Pair &&`

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.

iterator `const_iterator` `const value_type &`
iterator `const_iterator` `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.

iterator `const_iterator` `Pair &&`

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.

void `InputIterator` `InputIterator`

Requires: 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)

void `std::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_type `node_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_type `const_iterator` `node_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 > class... `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.

iterator class... `const_iterator` `Args &&...`

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 > class... `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.

iterator class... `const_iterator` `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 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 > class... `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.

iterator class... `const_iterator` `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 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.

size_type `const key_type &`

Effects: If present, erases the element in the container with key equivalent to x.

Returns: Returns the number of erased elements (0/1).

Complexity: log(size()) + count(k)

size_type `const K &`

Requires: This overload is available only if key_compare::is_transparent exists.

Effects: If present, erases the element in the container with key equivalent to x.

Returns: Returns the number of erased elements (0/1).

iterator `const_iterator`

Effects: Erases the element pointed to by p.

Returns: Returns an iterator pointing to the element immediately following q prior to the element being erased. If no such element exists, returns end().

Complexity: Amortized constant time

iterator `const_iterator` `const_iterator`

Effects: Erases all the elements in the range [first, last).

Returns: Returns last.

Complexity: log(size())+N where N is the distance from first to last.

node_type `const 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_type `const_iterator`

Effects: Removes the element pointed to by "position".

Returns: A node_type owning the element, otherwise an empty node_type.

Complexity: Amortized constant.

void ``map`< 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())

void ``map`< 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())

void ``multimap`< 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())

void ``multimap`< 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())

void ``map` &`

Effects: Swaps the contents of *this and x.

Throws: Nothing.

Complexity: Constant.

void

Effects: erase(begin(),end()).

Postcondition: size() == 0.

Complexity: linear in size().

key_compare

Effects: Returns the comparison object out of which a was constructed.

Complexity: Constant.

value_compare

Effects: Returns an object of value_compare constructed out of the comparison object.

Complexity: Constant.

iterator `const 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_iterator `const 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.

iterator `const 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_iterator `const 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_type `const key_type &`

Returns: The number of elements with key equivalent to x.

Complexity: log(size())+count(k)

size_type `const 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)

bool `const key_type &`

Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.

Complexity: log(size()).

bool `const 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()).

iterator `const 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_iterator `const 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

iterator `const 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_iterator `const 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

iterator `const 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_iterator `const 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

iterator `const 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_iterator `const 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

void

Effects: Rebalances the tree. It's a no-op for Red-Black and AVL trees.

Complexity: Linear

bool `const `map` &` `const `map` &`

Effects: Returns true if x and y are equal

Complexity: Linear to the number of elements in the container.

bool `const `map` &` `const `map` &`

Effects: Returns true if x and y are unequal

Complexity: Linear to the number of elements in the container.

bool `const `map` &` `const `map` &`

Effects: Returns true if x is less than y

Complexity: Linear to the number of elements in the container.

bool `const `map` &` `const `map` &`

Effects: Returns true if x is greater than y

Complexity: Linear to the number of elements in the container.

bool `const `map` &` `const `map` &`

Effects: Returns true if x is equal or less than y

Complexity: Linear to the number of elements in the container.

bool `const `map` &` `const `map` &`

Effects: Returns true if x is equal or greater than y

Complexity: Linear to the number of elements in the container.

void ``map` &` ``map` &`

Effects: x.swap(y)

Complexity: Constant.

is the key_type of the map

std::less<Key>

is the ordering function for Keys (e.g. std::less<Key>).

new_allocator< std::pair< const Key, T> >

is the allocator to allocate the `value_type`s (e.g. allocator< std::pair<const Key, T> > ).

tree_assoc_defaults

is an packed option type generated using using boost::container::tree_assoc_options.

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
implementation_defined
implementation_defined
(dtl::is_same< typename allocator_type::value_type, std::pair< const Key, T > >::value)

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.

InputIterator
InputIterator

Effects: 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.

InputIterator
InputIterator
const 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.

InputIterator
InputIterator
const 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.

InputIterator
InputIterator
const 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_t
InputIterator
InputIterator

Effects: 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_t
InputIterator
InputIterator
const 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_t
InputIterator
InputIterator
const 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_t
InputIterator
InputIterator
const 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_t
std::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_t
std::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_t
std::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.

allocator_type

Effects: 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: Nothing

Complexity: Constant.

Note: Non-standard extension.

const stored_allocator_type &

Effects: Returns a reference to the internal allocator.

Throws: Nothing

Complexity: Constant.

Note: Non-standard extension.

iterator

Effects: Returns an iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant

const_iterator

Effects: Returns a const_iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant.

iterator

Effects: Returns an iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

bool

Effects: Returns true if the container contains no elements.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the number of the elements contained in the container.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the largest possible size of the container.

Throws: Nothing.

Complexity: Constant.

iterator class... `Args &&...`

Effects: Inserts an object of type T constructed with std::forward<Args>(args)... in the container. p is a hint pointing to where the insert should start to search.

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

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

iterator class... `const_iterator` `Args &&...`

Effects: Inserts an object of type T constructed with std::forward<Args>(args)... in the container. p is a hint pointing to where the insert should start to search.

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

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

iterator `const value_type &`

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

Complexity: Logarithmic.

iterator `value_type &&`

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

Complexity: Logarithmic.

iterator `Pair &&`

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

Complexity: Logarithmic.

iterator `const_iterator` `const 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.

iterator `const_iterator` `movable_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.

iterator `const_iterator` `Pair &&`

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.

void `InputIterator` `InputIterator`

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

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

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

void `std::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())

iterator `node_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

iterator `const_iterator` `node_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".

iterator `const_iterator`

Effects: Erases the element pointed to by p.

Returns: Returns an iterator pointing to the element immediately following q prior to the element being erased. If no such element exists, returns end().

Complexity: Amortized constant time

size_type `const key_type &`

Effects: If present, erases the element in the container with key equivalent to x.

Returns: Returns the number of erased elements (0/1).

Complexity: log(size()) + count(k)

iterator `const_iterator` `const_iterator`

Effects: Erases all the elements in the range [first, last).

Returns: Returns last.

Complexity: log(size())+N where N is the distance from first to last.

node_type `const 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_type `const_iterator`

Effects: Removes the element pointed to by "position".

Returns: A node_type owning the element, otherwise an empty node_type.

Complexity: Amortized constant.

void ``multimap`< 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())

void ``multimap`< 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())

void ``map`< 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())

void ``map`< 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())

void ``multiset` &`

Effects: Swaps the contents of *this and x.

Throws: Nothing.

Complexity: Constant.

void

Effects: erase(begin(),end()).

Postcondition: size() == 0.

Complexity: linear in size().

key_compare

Effects: Returns the comparison object out of which a was constructed.

Complexity: Constant.

value_compare

Effects: Returns an object of value_compare constructed out of the comparison object.

Complexity: Constant.

iterator `const 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_iterator `const 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.

iterator `const 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_iterator `const 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_type `const key_type &`

Returns: The number of elements with key equivalent to x.

Complexity: log(size())+count(k)

size_type `const 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)

bool `const key_type &`

Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.

Complexity: log(size()).

bool `const 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()).

iterator `const 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_iterator `const 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

iterator `const 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_iterator `const 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

iterator `const 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_iterator `const 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

iterator `const 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_iterator `const 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

void

Effects: Rebalances the tree. It's a no-op for Red-Black and AVL trees.

Complexity: Linear

bool `const `multimap` &` `const `multimap` &`

Effects: Returns true if x and y are equal

Complexity: Linear to the number of elements in the container.

bool `const `multimap` &` `const `multimap` &`

Effects: Returns true if x and y are unequal

Complexity: Linear to the number of elements in the container.

bool `const `multimap` &` `const `multimap` &`

Effects: Returns true if x is less than y

Complexity: Linear to the number of elements in the container.

bool `const `multimap` &` `const `multimap` &`

Effects: Returns true if x is greater than y

Complexity: Linear to the number of elements in the container.

bool `const `multimap` &` `const `multimap` &`

Effects: Returns true if x is equal or less than y

Complexity: Linear to the number of elements in the container.

bool `const `multimap` &` `const `multimap` &`

Effects: Returns true if x is equal or greater than y

Complexity: Linear to the number of elements in the container.

void ``multimap` &` ``multimap` &`

Effects: x.swap(y)

Complexity: Constant.

InputIterator
InputIterator
InputIterator
InputIterator
AllocatorOrCompare const &
dtl::require_nonallocator_t<Compare>
dtl::require_allocator_t<Allocator>
InputIterator
InputIterator
Compare const &
Allocator const &
ordered_unique_range_t
InputIterator
InputIterator
ordered_unique_range_t
InputIterator
InputIterator
AllocatorOrCompare const &
dtl::require_nonallocator_t<Compare>
dtl::require_allocator_t<Allocator>
ordered_unique_range_t
InputIterator
InputIterator
Compare const &
Allocator const &
InputIterator
InputIterator
InputIterator
InputIterator
AllocatorOrCompare const &
dtl::require_nonallocator_t<Compare>
dtl::require_allocator_t<Allocator>
InputIterator
InputIterator
Compare const &
Allocator const &
ordered_range_t
InputIterator
InputIterator
ordered_range_t
InputIterator
InputIterator
AllocatorOrCompare const &
dtl::require_nonallocator_t<Compare>
dtl::require_allocator_t<Allocator>
ordered_range_t
InputIterator
InputIterator
Compare const &
Allocator const &
std::less<Key>
void

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 >
std::less<Key>
void

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

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

pointer `size_type`

Allocates memory for an array of count elements. Throws bad_alloc if there is no enough memory

void `pointer` `size_type`

Deallocates previously allocated memory. Never throws

size_type

Returns the maximum number of elements that could be allocated. Never throws

void ``new_allocator` &` ``new_allocator` &`

Swaps two allocators, does nothing because this new_allocator is stateless

bool `const `new_allocator` &` `const `new_allocator` &`

An new_allocator always compares to true, as memory allocated with one instance can be deallocated by another instance

bool `const `new_allocator` &` `const `new_allocator` &`

An new_allocator always compares to false, as memory allocated with one instance can be deallocated by another instance

void
Specialization 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

void ``new_allocator` &` ``new_allocator` &`

Swaps two allocators, does nothing because this new_allocator is stateless

bool `const `new_allocator` &` `const `new_allocator` &`

An new_allocator always compares to true, as memory allocated with one instance can be deallocated by another instance

bool `const `new_allocator` &` `const `new_allocator` &`

An new_allocator always compares to false, as memory allocated with one instance can be deallocated by another instance

std::size_t NodeAlloc_nodes_per_block

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< constT >::type
std::size_t
std::ptrdiff_t
boost::container::dtl::version_type< self_t,(unsigned int) Version >
Default constructor.
const `node_allocator` &
Copy constructor from other node_allocator.
const `node_allocator`< T2, NodesPerBlock > &
Copy constructor from related node_allocator.
Destructor.
size_type

Returns the number of elements that could be allocated. Never throws

pointer `size_type` `const void *0`

Allocate memory for an array of count elements. Throws bad_alloc if there is no enough memory

void `const pointer &` `size_type`

Deallocate allocated memory. Never throws

pointer `allocation_type` `size_type` `size_type &` `pointer &`
size_type `pointer`

Returns maximum the number of objects the previously allocated memory pointed by p can hold.

pointer

Allocates just one object. Memory allocated with this function must be deallocated only with deallocate_one(). Throws bad_alloc if there is no enough memory

void `std::size_t` `multiallocation_chain &`

Allocates many elements of size == 1. Elements must be individually deallocated with deallocate_one()

void `pointer`

Deallocates 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

void `multiallocation_chain &`
void `size_type` `std::size_t` `multiallocation_chain &`

Allocates many elements of size elem_size. Elements must be individually deallocated with deallocate()

void `const size_type *` `size_type` `multiallocation_chain &`

Allocates n_elements elements, each one of size elem_sizes[i] Elements must be individually deallocated with deallocate()

void `multiallocation_chain &`
void Deallocates all free blocks of the pool.
void `self_t &` `self_t &`

Swaps allocators. Does not throw. If each allocator is placed in a different memory segment, the result is undefined.

bool `const `node_allocator` &` `const `node_allocator` &`

An allocator always compares to true, as memory allocated with one instance can be deallocated by another instance

bool `const `node_allocator` &` `const `node_allocator` &`

An allocator always compares to false, as memory allocated with one instance can be deallocated by another instance

pointer `allocation_type` `std::size_t` `size_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
&&
bool
RelatedIt
RelatedNode &&
`insert_return_type_base` & ``insert_return_type_base` &&`
void

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 nodes

map<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
void ``node_handle` &` ``node_handle` &`

Effects: x.swap(y).

Effects: Initializes m_ptr to nullptr.

Postcondition: this->empty()

node_pointer
const 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 *
0

Effects: 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.

value_type &

Requires: empty() == false.

Returns: A reference to the value_type subobject in the container_node_type object pointed to by m_ptr

Throws: 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_ptr

Throws: Nothing.

allocator_type

Requires: empty() == false.

Returns: A copy of the internally hold allocator.

Throws: Nothing.

bool

Returns: m_ptr != nullptr.

bool

Returns: m_ptr == nullptr.

void ``node_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_pointer

Effects: 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_pointer

Effects: 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

std::size_t

An unsigned integer value.

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.

std::size_t

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.

bool

This option setter specifies if the container will cache the first non-empty bucket so that begin() is O(1) instead of searching for the first non-empty bucket (which can be O(bucket_size()))

class ...

Helper metafunction to combine options into a single type to be used by `boost::container::deque`. Supported options are: `boost::container::block_bytes` and `boost::container::block_size`

implementation_defined
class ...

Helper metafunction to combine options into a single type to be used by `boost::container::devector`. Supported options are: `boost::container::growth_factor`, `boost::container::stored_size` and `boost::container::relocate_on`

implementation_defined
bool

A function object that has the following signature: `template<class SizeType>` `SizeType operator()(SizeType cur_cap, SizeType add_min_cap, SizeType max_cap) const;`. `cur_cap` is the current capacity, `add_min_cap` is the minimum additional capacity we want to achieve and `max_cap` is the maximum capacity that the allocator or other factors allow. The implementation should return a value between `cur_cap` + `add_min_cap` and `max_cap`. `cur_cap` + `add_min_cap` is guaranteed not to overflow/wraparound, but the implementation should handle wraparound produced by the growth factor.

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 its 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 its capacity a 50% when existing capacity is exhausted.

This growth factor argument specifies that the container should increase its capacity a 60% when existing capacity is exhausted.

class ...

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
std::size_t

An unsigned integer value. Must be power of two.

This option specifies the desired alignment for the value_type stored in the container. A value zero represents the natural alignment.

bool
bool

This option setter specifies if node size is optimized storing rebalancing data masked into pointers for ordered associative containers

class ...
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`, `boost::container::inplace_alignment` and `boost::container::stored_size`.

implementation_defined
class ...
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`, `boost::container::inplace_alignment` and `boost::container::stored_size`.

implementation_defined
bool
defined(BOOST_CONTAINER_DOXYGEN_INVOKED)

This option setter specifies if nodes also store the hash value so that search and rehashing for hash-expensive types is improved. This option might degrade performance for easy to hash types (like integers)

An unsigned integer type. It shall be smaller than than the size of the size_type deduced from `allocator_traits<A>::size_type` or the same type.

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, specially for empty containers. This could potentially improve performance 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`, the container 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.

bool

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.

class ...

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
tree_type_enum
defined(BOOST_CONTAINER_DOXYGEN_INVOKED)

This option setter specifies the underlying tree type (red-black, AVL, Scapegoat or Splay) for ordered associative containers

class ...

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`.

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`.

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`.

typename `boost::container::static_vector_options`< Options... >::type

Helper alias metafunction to combine options into a single type to be used by `boost::container::devector`.

typename `boost::container::devector_options`< Options... >::type

Helper alias metafunction to combine options into a single type to be used by `boost::container::deque`.

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.

BOOST_STATIC_CONSTEXPR std::size_t

Effects: Destroys this memory_resource.

void * `std::size_t` `std::size_tmax_align`

Effects: Equivalent to `return do_allocate(bytes, alignment);`

void `void *` `std::size_t` `std::size_tmax_align`

Effects: Equivalent to `return do_deallocate(bytes, alignment);`

bool `const `memory_resource` &`

Effects: Equivalent to `return do_is_equal(other);`

bool `const `memory_resource` &` `const `memory_resource` &`

Returns: `&a == &b || a.is_equal(b)`.

bool `const `memory_resource` &` `const `memory_resource` &`

Returns: !(a == b).

void * `std::size_t` `std::size_t`

Requires: 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.

void `void *` `std::size_t` `std::size_t`

Requires: 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.

bool `const `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_resource

A 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.

BOOST_STATIC_CONSTEXPR std::size_t

The number of bytes that will be requested by the default in the first call to the upstream allocator

Note: Non-standard extension.

memory_resource
*
0

Requires: `upstream` shall be the address of a valid memory resource or `nullptr`

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 the internal `next_buffer_size` to an implementation-defined size.

std::size_t
memory_resource
*
0

Requires: `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_t
memory_resource
*
0

Requires: `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_resource` `const `monotonic_buffer_resource` &`

Effects: Calls `this->release()`.

void

Effects: `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_t `std::size_t` `std::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_t `std::size_t1u`

Returns: 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_t

Returns: The number of bytes that will be requested for the next buffer once the current one is exhausted.

Note: Non-standard extension.

void * `std::size_t` `std::size_t`

Returns: 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.

void `void *` `std::size_t` `std::size_t`

Effects: None

Throws: Nothing

Remarks: Memory used by this resource increases monotonically until its destruction.

bool `const `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

Effects: Sets m_resource to `get_default_resource()`.

memory_resource
*

Requires: r is non-null.

Effects: Sets m_resource to r.

Throws: Nothing

Notes: This constructor provides an implicit conversion from memory_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().

T * `size_t`

Returns: Equivalent to `static_cast<T*>(m_resource->allocate(n * sizeof(T), alignof(T)))`.

void `T *` `size_t`

Requires: 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.

void class ... `U *` `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.

void `U *`

Effects: p->~U().

`polymorphic_allocator`

Returns: Equivalent to `polymorphic_allocator()`.

`memory_resource` *

Returns: m_resource.

bool `const `polymorphic_allocator`< T1 > &` `const `polymorphic_allocator`< T2 > &`

Returns: `*a.resource() == *b.resource()`.

bool `const `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_resource

An 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<U>> 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

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.

allocator_type & Effects: Returns m_alloc.
const allocator_type & Effects: Returns m_alloc.
void * `std::size_t` `std::size_t`

Returns: 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.

void `void *` `std::size_t` `std::size_t`

Requires: 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().

bool `const `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_t` `std::size_t`
void `void *` `std::size_t` `std::size_t`
void * `void *`
std::size_t `std::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 > >
BOOST_STATIC_CONSTEXPR std::size_t
::boost::container::new_allocator< T >
BOOST_STATIC_CONSTEXPR std::size_t
std::allocator< T >
BOOST_STATIC_CONSTEXPR std::size_t
boost::container::pmr::memory_resource

A 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.

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_resource` `const `synchronized_pool_resource` &`

Effects: Calls `this->release()`.

void

Effects: 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_options`

Returns: 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_t

Returns: The number of pools that will be used in the pool resource.

Note: Non-standard extension.

std::size_t `std::size_t`

Returns: 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_t `std::size_t`

Requires: `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_t `std::size_t`

Requires: `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_t `std::size_t`

Requires: `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.

void * `std::size_t` `std::size_t`

Returns: 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.

void `void *` `std::size_t` `std::size_t`

Effects: 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.

bool `const `memory_resource` &`

Returns: `this == dynamic_cast<const unsynchronized_pool_resource*>(&other)`.

boost::container::pmr::memory_resource

A 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.

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_resource` `const `unsynchronized_pool_resource` &`

Effects: Calls `this->release()`.

void

Effects: 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_options`

Returns: 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_t

Returns: The number of pools that will be used in the pool resource.

Note: Non-standard extension.

std::size_t `std::size_t`

Returns: 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_t `std::size_t`

Requires: `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_t `std::size_t`

Requires: `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_t `std::size_t`

Requires: `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.

void * `std::size_t` `std::size_t`

Returns: 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.

void `void *` `std::size_t` `std::size_t`

Effects: 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.

bool `const `memory_resource` &`

Returns: `this == dynamic_cast<const unsynchronized_pool_resource*>(&other)`.

typename ...
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

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` &&`
void ``scoped_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_type

Returns: `allocator_traits<OuterAlloc>:: max_size(outer_allocator())`.

void `T *`

Effects: calls `OUTERMOST_ALLOC_TRAITS(*this):: destroy(OUTERMOST(*this), p)`.

pointer `size_type`

Returns: `allocator_traits<OuterAlloc>::allocate(outer_allocator(), n)`.

pointer `size_type` `const_void_pointer`

Returns: `allocator_traits<OuterAlloc>::allocate(outer_allocator(), n, hint)`.

void `pointer` `size_type`

Effects: `allocator_traits<OuterAlloc>::deallocate(outer_allocator(), p, n)`.

`scoped_allocator_adaptor`

Returns: 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.

void class ... `T *` `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]

void ``scoped_allocator_adaptor` &` ``scoped_allocator_adaptor` &`

Effects: swaps *this with r.

bool BOOST_CONTAINER_SCOPEDALLOC_ALLINNERCLASS `const `scoped_allocator_adaptor`< OuterA1, InnerAllocs... > &` `const `scoped_allocator_adaptor`< OuterA2, InnerAllocs... > &`
bool BOOST_CONTAINER_SCOPEDALLOC_ALLINNERCLASS `const `scoped_allocator_adaptor`< OuterA1, InnerAllocs... > &` `const `scoped_allocator_adaptor`< OuterA2, InnerAllocs... > &`

This header file forward declares boost::container::scoped_allocator_adaptor

std::less<Key>
void

A portable metafunction to obtain a multiset that uses a polymorphic allocator

`boost::container::multiset`< Key, Compare, `polymorphic_allocator`< Key >, Options >
std::less<Key>
void

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 >

is the type to be inserted in the set, which is also the key_type

std::less<Key>

is the comparison functor used to order keys

new_allocator<Key>

is the allocator to be used to allocate memory for this container

tree_assoc_defaults

is an packed option type generated using using boost::container::tree_assoc_options.

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

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.

InputIterator
InputIterator

Effects: 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.

InputIterator
InputIterator
const 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.

InputIterator
InputIterator
const 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.

InputIterator
InputIterator
const 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_t
InputIterator
InputIterator

Effects: 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_t
InputIterator
InputIterator
const 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_t
InputIterator
InputIterator
const 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_t
InputIterator
InputIterator
const 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_t
std::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_t
std::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_t
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 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().

allocator_type

Effects: 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: Nothing

Complexity: Constant.

Note: Non-standard extension.

const stored_allocator_type &

Effects: Returns a reference to the internal allocator.

Throws: Nothing

Complexity: Constant.

Note: Non-standard extension.

iterator

Effects: Returns an iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant

const_iterator

Effects: Returns a const_iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant.

iterator

Effects: Returns an iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

bool

Effects: Returns true if the container contains no elements.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the number of the elements contained in the container.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the largest possible size of the container.

Throws: Nothing.

Complexity: Constant.

iterator class... `Args &&...`

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.

iterator class... `const_iterator` `Args &&...`

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.

iterator `const value_type &`

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

Complexity: Logarithmic.

iterator `value_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.

iterator `const_iterator` `const 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.

iterator `const_iterator` `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 in general, but amortized constant if t is inserted right before p.

void `InputIterator` `InputIterator`

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

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

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

void `std::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())

iterator `node_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

iterator `const_iterator` `node_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.

void ``multiset`< 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())

void ``multiset`< 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())

void ``set`< 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())

void ``set`< 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())

iterator `const_iterator`

Effects: Erases the element pointed to by p.

Returns: Returns an iterator pointing to the element immediately following q prior to the element being erased. If no such element exists, returns end().

Complexity: Amortized constant time

size_type `const key_type &`

Effects: If present, erases the element in the container with key equivalent to x.

Returns: Returns the number of erased elements (0/1).

Complexity: log(size()) + count(k)

iterator `const_iterator` `const_iterator`

Effects: Erases all the elements in the range [first, last).

Returns: Returns last.

Complexity: log(size())+N where N is the distance from first to last.

node_type `const_iterator`

Effects: Removes the element pointed to by "position".

Returns: A node_type owning the element, otherwise an empty node_type.

Complexity: Amortized constant.

node_type `const 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()).

void ``multiset` &`

Effects: Swaps the contents of *this and x.

Throws: Nothing.

Complexity: Constant.

void

Effects: erase(begin(),end()).

Postcondition: size() == 0.

Complexity: linear in size().

key_compare

Effects: Returns the comparison object out of which a was constructed.

Complexity: Constant.

value_compare

Effects: Returns an object of value_compare constructed out of the comparison object.

Complexity: Constant.

iterator `const 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_iterator `const 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.

iterator `const 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_iterator `const 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_type `const key_type &`

Returns: The number of elements with key equivalent to x.

Complexity: log(size())+count(k)

size_type `const 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)

bool `const key_type &`

Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.

Complexity: log(size()).

bool `const 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()).

iterator `const 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_iterator `const 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

iterator `const 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_iterator `const 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

iterator `const 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_iterator `const 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

iterator `const 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_iterator `const 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

void

Effects: Rebalances the tree. It's a no-op for Red-Black and AVL trees.

Complexity: Linear

bool `const `multiset` &` `const `multiset` &`

Effects: Returns true if x and y are equal

Complexity: Linear to the number of elements in the container.

bool `const `multiset` &` `const `multiset` &`

Effects: Returns true if x and y are unequal

Complexity: Linear to the number of elements in the container.

bool `const `multiset` &` `const `multiset` &`

Effects: Returns true if x is less than y

Complexity: Linear to the number of elements in the container.

bool `const `multiset` &` `const `multiset` &`

Effects: Returns true if x is greater than y

Complexity: Linear to the number of elements in the container.

bool `const `multiset` &` `const `multiset` &`

Effects: Returns true if x is equal or less than y

Complexity: Linear to the number of elements in the container.

bool `const `multiset` &` `const `multiset` &`

Effects: Returns true if x is equal or greater than y

Complexity: Linear to the number of elements in the container.

void ``multiset` &` ``multiset` &`

Effects: x.swap(y)

Complexity: Constant.

is the type to be inserted in the set, which is also the key_type

std::less<Key>

is the comparison functor used to order keys

new_allocator<Key>

is the allocator to be used to allocate memory for this container

void

is an packed option type generated using using boost::container::tree_assoc_options.

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

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.

InputIterator
InputIterator

Effects: 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.

InputIterator
InputIterator
const 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.

InputIterator
InputIterator
const 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.

InputIterator
InputIterator
const 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_t
InputIterator
InputIterator

Effects: 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_t
InputIterator
InputIterator
const 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_t
InputIterator
InputIterator
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 [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_t
InputIterator
InputIterator
const 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_t
std::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_t
std::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_t
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 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().

allocator_type

Effects: 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: Nothing

Complexity: Constant.

Note: Non-standard extension.

const stored_allocator_type &

Effects: Returns a reference to the internal allocator.

Throws: Nothing

Complexity: Constant.

Note: Non-standard extension.

iterator

Effects: Returns an iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant

const_iterator

Effects: Returns a const_iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the container.

Throws: Nothing.

Complexity: Constant.

iterator

Effects: Returns an iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the container.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed container.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed container.

Throws: Nothing.

Complexity: Constant.

bool

Effects: Returns true if the container contains no elements.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the number of the elements contained in the container.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the largest possible size of the container.

Throws: Nothing.

Complexity: Constant.

std::pair< iterator, bool > class... `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.

iterator class... `const_iterator` `Args &&...`

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.

iterator `const_iterator` `const 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.

iterator `const_iterator` `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.

void `InputIterator` `InputIterator`

Requires: 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)

void `std::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_type `node_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_type `const_iterator` `node_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".

void ``set`< 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())

void ``set`< 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())

void ``multiset`< 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())

void ``multiset`< 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())

size_type `const key_type &`

Effects: If present, erases the element in the container with key equivalent to x.

Returns: Returns the number of erased elements (0/1).

Complexity: log(size()) + count(k)

iterator `const_iterator`

Effects: Erases the element pointed to by p.

Returns: Returns an iterator pointing to the element immediately following q prior to the element being erased. If no such element exists, returns end().

Complexity: Amortized constant time

iterator `const_iterator` `const_iterator`

Effects: Erases all the elements in the range [first, last).

Returns: Returns last.

Complexity: log(size())+N where N is the distance from first to last.

node_type `const_iterator`

Effects: Removes the element pointed to by "position".

Returns: A node_type owning the element, otherwise an empty node_type.

Complexity: Amortized constant.

node_type `const 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()).

void ``set` &`

Effects: Swaps the contents of *this and x.

Throws: Nothing.

Complexity: Constant.

void

Effects: erase(begin(),end()).

Postcondition: size() == 0.

Complexity: linear in size().

key_compare

Effects: Returns the comparison object out of which a was constructed.

Complexity: Constant.

value_compare

Effects: Returns an object of value_compare constructed out of the comparison object.

Complexity: Constant.

iterator `const 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_iterator `const 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.

iterator `const 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_iterator `const 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_type `const key_type &`

Returns: The number of elements with key equivalent to x.

Complexity: log(size())+count(k)

size_type `const 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)

bool `const key_type &`

Returns: Returns true if there is an element with key equivalent to key in the container, otherwise false.

Complexity: log(size()).

bool `const 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()).

iterator `const 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_iterator `const 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

iterator `const 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_iterator `const 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

iterator `const 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_iterator `const 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

iterator `const 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_iterator `const 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

void

Effects: Rebalances the tree. It's a no-op for Red-Black and AVL trees.

Complexity: Linear

bool `const `set` &` `const `set` &`

Effects: Returns true if x and y are equal

Complexity: Linear to the number of elements in the container.

bool `const `set` &` `const `set` &`

Effects: Returns true if x and y are unequal

Complexity: Linear to the number of elements in the container.

bool `const `set` &` `const `set` &`

Effects: Returns true if x is less than y

Complexity: Linear to the number of elements in the container.

bool `const `set` &` `const `set` &`

Effects: Returns true if x is greater than y

Complexity: Linear to the number of elements in the container.

bool `const `set` &` `const `set` &`

Effects: Returns true if x is equal or less than y

Complexity: Linear to the number of elements in the container.

bool `const `set` &` `const `set` &`

Effects: Returns true if x is equal or greater than y

Complexity: Linear to the number of elements in the container.

void ``set` &` ``set` &`

Effects: x.swap(y)

Complexity: Constant.

InputIterator
InputIterator
InputIterator
InputIterator
AllocatorOrCompare const &
dtl::require_nonallocator_t<Compare>
dtl::require_allocator_t<Allocator>
InputIterator
InputIterator
Compare const &
Allocator const &
ordered_unique_range_t
InputIterator
InputIterator
ordered_unique_range_t
InputIterator
InputIterator
AllocatorOrCompare const &
dtl::require_nonallocator_t<Compare>
dtl::require_allocator_t<Allocator>
ordered_unique_range_t
InputIterator
InputIterator
Compare const &
Allocator const &
InputIterator
InputIterator
InputIterator
InputIterator
AllocatorOrCompare const &
dtl::require_nonallocator_t<Compare>
dtl::require_allocator_t<Allocator>
InputIterator
InputIterator
Compare const &
Allocator const &
ordered_range_t
InputIterator
InputIterator
ordered_range_t
InputIterator
InputIterator
AllocatorOrCompare const &
dtl::require_nonallocator_t<Compare>
dtl::require_allocator_t<Allocator>
ordered_range_t
InputIterator
InputIterator
Compare const &
Allocator const &

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 > >

The type of object that is stored in the list

void

The allocator used for all internal memory management, use void for the default allocator

dtl::node_alloc_holder< real_allocator< T, void >::type, dtl::intrusive_slist_type< real_allocator< T, void >::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

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: Nothing

Complexity: Constant.

size_type

Effects: 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_type
const 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_type
const 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.

InpIt
InpIt
const 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 constructor

Complexity: 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 constructor

Complexity: 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)

void `size_type` `const 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.

void `InpIt` `InpIt`

Effects: Assigns the range [first, last) to *this.

Throws: If memory allocation throws or T's constructor from dereferencing InpIt throws.

Complexity: Linear to n.

void `std::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_type

Effects: 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: Nothing

Complexity: Constant.

Note: Non-standard extension.

const stored_allocator_type &

Effects: Returns a reference to the internal allocator.

Throws: Nothing

Complexity: Constant.

Note: Non-standard extension.

iterator

Effects: 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_iterator

Effects: 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.

iterator

Effects: Returns an iterator to the first element contained in the list.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the list.

Throws: Nothing.

Complexity: Constant.

iterator

Effects: Returns an iterator to the end of the list.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the list.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: 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_iterator

Effects: Returns a const_iterator to the first element contained in the list.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the list.

Throws: Nothing.

Complexity: Constant.

iterator `iterator`

Returns: 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_iterator `const_iterator`

Returns: 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.

bool

Effects: Returns true if the list contains no elements.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the number of the elements contained in the list.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the largest possible size of the list.

Throws: Nothing.

Complexity: Constant.

void `size_type`

Effects: Inserts or erases elements at the end such that the size becomes n. New elements are value initialized.

Throws: If memory allocation throws, or T's copy constructor throws.

Complexity: Linear to the difference between size() and new_size.

void `size_type` `const 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.

reference

Requires: !empty()

Effects: Returns a reference to the first element from the beginning of the container.

Throws: Nothing.

Complexity: Constant.

const_reference

Requires: !empty()

Effects: Returns a const reference to the first element from the beginning of the container.

Throws: Nothing.

Complexity: Constant.

reference class... `Args &&...`

Effects: Inserts an object of type T constructed with std::forward<Args>(args)... in the front of the list

Returns: A reference to the created object.

Throws: If memory allocation throws or T's copy constructor throws.

Complexity: Amortized constant time.

iterator class... `const_iterator` `Args &&...`

Effects: Inserts an object of type T constructed with std::forward<Args>(args)... after prev

Throws: If memory allocation throws or T's in-place constructor throws.

Complexity: Constant

void `const 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.

void `T &&`

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.

iterator `const_iterator` `const 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.

iterator `const_iterator` `T &&`

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.

iterator `const_iterator` `size_type` `const 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.

iterator `const_iterator` `InpIt` `InpIt`

Requires: 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.

iterator `const_iterator` `std::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.

void

Effects: Removes the first element from the list.

Throws: Nothing.

Complexity: Amortized constant time.

iterator `const_iterator`

Effects: 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.

iterator `const_iterator` `const_iterator`

Effects: 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.

void ``slist` &`

Effects: Swaps the contents of *this and x.

Throws: Nothing.

Complexity: Linear to the number of elements on *this and x.

void

Effects: Erases all the elements of the list.

Throws: Nothing.

Complexity: Linear to the number of elements in the list.

void `const_iterator` ``slist` &`

Requires: p must point to an element contained by the list. x != *this

Effects: 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: 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.

void `const_iterator` ``slist` &&`

Requires: p must point to an element contained by the list. x != *this

Effects: 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: 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.

void `const_iterator` ``slist` &` `const_iterator`

Requires: 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: Nothing

Complexity: 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.

void `const_iterator` ``slist` &&` `const_iterator`

Requires: 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: Nothing

Complexity: 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.

void `const_iterator` ``slist` &` `const_iterator` `const_iterator`

Requires: 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: Nothing

Complexity: 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.

void `const_iterator` ``slist` &&` `const_iterator` `const_iterator`

Requires: 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: Nothing

Complexity: 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.

void `const_iterator` ``slist` &` `const_iterator` `const_iterator` `size_type`

Requires: 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: Nothing

Complexity: 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.

void `const_iterator` ``slist` &&` `const_iterator` `const_iterator` `size_type`

Requires: 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: Nothing

Complexity: 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.

void `const 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.

void `Pred`

Effects: 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.

void

Effects: 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.

void `Pred`

Effects: 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.

void ``slist` &`

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.

void ``slist` &&`

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.

void ``slist` &` `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.

void ``slist` &&` `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.

void

Effects: 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.

void `StrictWeakOrdering`

Effects: 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.

void

Effects: Reverses the order of elements in the list.

Throws: Nothing.

Complexity: This function is linear time.

Note: Iterators and references are not invalidated

iterator class... `const_iterator` `Args &&...`

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: Linear to the elements before p

iterator `const_iterator` `const 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.

iterator `const_iterator` `T &&`

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.

iterator `const_iterator` `size_type` `const 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.

iterator `const_iterator` `InIter` `InIter`

Requires: 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.

iterator `const_iterator` `std::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.

iterator `const_iterator`

Requires: 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.

iterator `const_iterator` `const_iterator`

Requires: 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.

void `const_iterator` ``slist` &`

Requires: p must point to an element contained by the list. x != *this. this' allocator and x's allocator shall compare equal

Effects: 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: Nothing

Complexity: 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.

void `const_iterator` ``slist` &&`

Requires: p must point to an element contained by the list. x != *this. this' allocator and x's allocator shall compare equal

Effects: 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: Nothing

Complexity: 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.

void `const_iterator` ``slist` &` `const_iterator`

Requires: 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: Nothing

Complexity: 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.

void `const_iterator` ``slist` &&` `const_iterator`

Requires: 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: Nothing

Complexity: 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.

void `const_iterator` ``slist` &` `const_iterator` `const_iterator`

Requires: 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: Nothing

Complexity: 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.

void `const_iterator` ``slist` &&` `const_iterator` `const_iterator`

Requires: 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: Nothing

Complexity: 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.

bool `const `slist` &` `const `slist` &`

Effects: Returns true if x and y are equal

Complexity: Linear to the number of elements in the container.

bool `const `slist` &` `const `slist` &`

Effects: Returns true if x and y are unequal

Complexity: Linear to the number of elements in the container.

bool `const `slist` &` `const `slist` &`

Effects: Returns true if x is less than y

Complexity: Linear to the number of elements in the container.

bool `const `slist` &` `const `slist` &`

Effects: Returns true if x is greater than y

Complexity: Linear to the number of elements in the container.

bool `const `slist` &` `const `slist` &`

Effects: Returns true if x is equal or less than y

Complexity: Linear to the number of elements in the container.

bool `const `slist` &` `const `slist` &`

Effects: Returns true if x is equal or greater than y

Complexity: Linear to the number of elements in the container.

void ``slist` &` ``slist` &`

Effects: x.swap(y)

Complexity: Constant.

InpIt
InpIt
InpIt
InpIt
Allocator const &
boost::container::slist< T
ValueAllocator >

A specialization of insert_iterator that works with slist

`Container`
output_iterator_tag
void
void
void
void
Container
&
typename Container::iterator
bool
false
insert_iterator< `Container` > & `const typename Container::value_type &`
insert_iterator< `Container` > &
insert_iterator< `Container` > &
insert_iterator< `Container` > & `int`
std::size_t

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 > >

The type of object that is stored in the small_vector

std::size_t

The number of preallocated elements stored inside small_vector. It shall be less than Allocator::max_size();

void

The allocator used for memory management when the number of elements exceeds N. Use void for the default allocator

void

A type produced from `boost::container::small_vector_options`.

boost::container::small_vector_base< T, void, void >

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.

Any change to the capacity of the vector, including decreasing its size such as with the shrink_to_fit method, will cause the vector to permanently switch to dynamically allocated storage.

const allocator_type &
size_type
size_type
const allocator_type &
size_type
default_init_t
size_type
default_init_t
const allocator_type &
size_type
const value_type &
size_type
const value_type &
const allocator_type &
InIt
InIt last
InIt
InIt
const 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 &&`
void ``small_vector` &`
void
void
void
allocator_traits::template portable_rebind_alloc::type

A 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>`.

`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
typedef dtl::version_type< `small_vector_allocator` BOOST_CONTAINER_I 1 > version;

Obtains an small_vector_allocator that allocates objects of type T2

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

pointer `size_type` `const_void_pointerconst_void_pointer()` Allocates storage from the standard-conforming allocator.
void `pointer` `size_type`

Deallocates previously allocated memory. Never throws

size_type

Returns the maximum number of elements that could be allocated. Never throws

`small_vector_allocator`
bool `pointer`
void ``small_vector_allocator` &` ``small_vector_allocator` &`

Swaps two allocators, does nothing because this small_vector_allocator is stateless

bool `const `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)

bool `const `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

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.

void ``small_vector_base` &` `size_type`
`small_vector_base` & `const `small_vector_base` &`
`small_vector_base` & ``small_vector_base` &&`
void ``small_vector_base` &`
std::size_t
std::size_t
dtl::aligned_storage< sizeof(T) *N, Alignment >::type
storage_type
BOOST_STATIC_CONSTEXPR std::size_t
std::size_t
T
0u
Alignment
BOOST_STATIC_CONSTEXPR std::size_t
Options
void
small_vector_null_opt
get_small_vector_opt::type
get_small_vector_opt< Options >::type
vector_opt< typename options_t::growth_factor_type, typename options_t::stored_size_type >
void
void
`vector`< T, `small_vector_allocator`< T, typename `allocator_traits`< typename real_allocator< T, SecAlloc >::type >::template portable_rebind_alloc< void >::type, Options >, typename dtl::get_vopt_from_svopt< Options >::type >

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 > >

The type of object that is stored in the stable_vector

void

The allocator used for all internal memory management

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

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: Nothing

Complexity: Constant.

size_type

Effects: 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_type
default_init_t

Effects: 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_type
const 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_type
default_init_t
const 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_type
const 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.

InputIterator
InputIterator
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 [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_vector

Throws: 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()).

void `size_type` `const 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.

void `InputIterator` `InputIterator`

Effects: 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.

void `std::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_type

Effects: 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: Nothing

Complexity: Constant.

Note: Non-standard extension.

stored_allocator_type &

Effects: Returns a reference to the internal allocator.

Throws: Nothing

Complexity: Constant.

Note: Non-standard extension.

iterator

Effects: Returns an iterator to the first element contained in the stable_vector.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the stable_vector.

Throws: Nothing.

Complexity: Constant.

iterator

Effects: Returns an iterator to the end of the stable_vector.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the stable_vector.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the beginning of the reversed stable_vector.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed stable_vector.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the end of the reversed stable_vector.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed stable_vector.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the stable_vector.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the stable_vector.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed stable_vector.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed stable_vector.

Throws: Nothing.

Complexity: Constant.

bool

Effects: Returns true if the stable_vector contains no elements.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the number of the elements contained in the stable_vector.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the largest possible size of the stable_vector.

Throws: Nothing.

Complexity: Constant.

void `size_type`

Effects: Inserts or erases elements at the end such that the size becomes n. New elements are value initialized.

Throws: If memory allocation throws, or T's value initialization throws.

Complexity: Linear to the difference between size() and new_size.

void `size_type` ``default_init_t``

Effects: Inserts or erases elements at the end such that the size becomes n. New elements are default initialized.

Throws: If memory allocation throws, or T's default initialization throws.

Complexity: Linear to the difference between size() and new_size.

Note: Non-standard extension

void `size_type` `const 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_type

Effects: Number of elements for which memory has been allocated. capacity() is always greater than or equal to size().

Throws: Nothing.

Complexity: Constant.

void `size_type`

Effects: If n is less than or equal to capacity(), this call has no effect. Otherwise, it is a request for allocation of additional memory. If the request is successful, then capacity() is greater than or equal to n; otherwise, capacity() is unchanged. In either case, size() is unchanged.

Throws: If memory allocation allocation throws.

void

Effects: Tries to deallocate the excess of memory created with previous allocations. The size of the stable_vector is unchanged

Throws: If memory allocation throws.

Complexity: Linear to size().

reference

Requires: !empty()

Effects: Returns a reference to the first element of the container.

Throws: Nothing.

Complexity: Constant.

const_reference

Requires: !empty()

Effects: Returns a const reference to the first element of the container.

Throws: Nothing.

Complexity: Constant.

reference

Requires: !empty()

Effects: Returns a reference to the last element of the container.

Throws: Nothing.

Complexity: Constant.

const_reference

Requires: !empty()

Effects: Returns a const reference to the last element of the container.

Throws: Nothing.

Complexity: Constant.

reference `size_type`

Requires: size() > n.

Effects: Returns a reference to the nth element from the beginning of the container.

Throws: Nothing.

Complexity: Constant.

const_reference `size_type`

Requires: size() > n.

Effects: Returns a const reference to the nth element from the beginning of the container.

Throws: Nothing.

Complexity: Constant.

iterator `size_type`

Requires: size() >= n.

Effects: Returns an iterator to the nth element from the beginning of the container. Returns end() if n == size().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

const_iterator `size_type`

Requires: size() >= n.

Effects: Returns a const_iterator to the nth element from the beginning of the container. Returns end() if n == size().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

size_type `iterator`

Requires: begin() <= p <= end().

Effects: Returns the index of the element pointed by p and size() if p == end().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

size_type `const_iterator`

Requires: begin() <= p <= end().

Effects: Returns the index of the element pointed by p and size() if p == end().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

reference `size_type`

Requires: size() > n.

Effects: Returns a reference to the nth element from the beginning of the container.

Throws: range_error if n >= size()

Complexity: Constant.

const_reference `size_type`

Requires: size() > n.

Effects: Returns a const reference to the nth element from the beginning of the container.

Throws: range_error if n >= size()

Complexity: Constant.

reference class ... `Args &&...`

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.

iterator class ... `const_iterator` `Args &&...`

Requires: p must be a valid iterator of *this.

Effects: Inserts an object of type T constructed with std::forward<Args>(args)... before p

Throws: If memory allocation throws or the in-place constructor throws.

Complexity: If p is end(), amortized constant time Linear time otherwise.

void `const 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.

void `T &&`

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.

iterator `const_iterator` `const 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.

iterator `const_iterator` `T &&`

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.

iterator `const_iterator` `size_type` `const 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.

iterator `const_iterator` `std::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()).

iterator `const_iterator` `InputIterator` `InputIterator`

Requires: 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).

void

Effects: Removes the last element from the stable_vector.

Throws: Nothing.

Complexity: Constant time.

iterator `const_iterator`

Effects: 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.

iterator `const_iterator` `const_iterator`

Effects: Erases the elements pointed by [first, last).

Throws: Nothing.

Complexity: Linear to the distance between first and last plus linear to the elements between p and the last element.

void ``stable_vector` &`

Effects: Swaps the contents of *this and x.

Throws: Nothing.

Complexity: Constant.

void

Effects: Erases all the elements of the stable_vector.

Throws: Nothing.

Complexity: Linear to the number of elements in the stable_vector.

bool `const `stable_vector` &` `const `stable_vector` &`

Effects: Returns true if x and y are equal

Complexity: Linear to the number of elements in the container.

bool `const `stable_vector` &` `const `stable_vector` &`

Effects: Returns true if x and y are unequal

Complexity: Linear to the number of elements in the container.

bool `const `stable_vector` &` `const `stable_vector` &`

Effects: Returns true if x is less than y

Complexity: Linear to the number of elements in the container.

bool `const `stable_vector` &` `const `stable_vector` &`

Effects: Returns true if x is greater than y

Complexity: Linear to the number of elements in the container.

bool `const `stable_vector` &` `const `stable_vector` &`

Effects: Returns true if x is equal or less than y

Complexity: Linear to the number of elements in the container.

bool `const `stable_vector` &` `const `stable_vector` &`

Effects: Returns true if x is equal or greater than y

Complexity: Linear to the number of elements in the container.

void ``stable_vector` &` ``stable_vector` &`

Effects: x.swap(y)

Complexity: Constant.

InputIterator
InputIterator
InputIterator
InputIterator
Allocator const &

The type of element that will be stored.

std::size_t

The maximum number of elements static_vector can store, fixed at compile time.

void

A type produced from `boost::container::static_vector_options`. If no option is specified, by default throw_on_overflow<true> option is set.

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 Handling

If `throw_on_overflow` option is true (default behaviour), insertion beyond the capacity result in throwing bad_alloc() if exceptions are enabled and or calling throw_bad_alloc() if not enabled. If `throw_on_overflow` option is false, insertion beyond capacity results in Undefined Behaviour.

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
BOOST_STATIC_CONSTEXPR size_type The capacity/max size of the container.
Constructs an empty static_vector.

# Throws

Nothing.

# Complexity

Constant O(1).

size_type

The number of values which will be contained in the container.

Constructs a static_vector containing count value initialized values.

# Throws

- If T's value initialization throws

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Linear O(N).

`count <= capacity()`

size_type

The number of values which will be contained in the container.

default_init_t
Constructs a static_vector containing count default initialized values.

# Throws

- If T's default initialization throws.

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Linear O(N).

# Note

Non-standard extension

`count <= capacity()`

size_type

The 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.

# Throws

- If T's copy constructor throws.

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Linear O(N).

`count <= capacity()`

Iterator

The iterator to the first element in range.

Iterator

The iterator to the one after the last element in range.

Constructs a static_vector containing copy of a range `[first, last)`.

# Throws

- If T's constructor taking a dereferenced Iterator throws.

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Linear 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())`.

# Throws

- If T's constructor taking a dereferenced std::initializer_list throws.

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Linear 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.

# Throws

If T's copy constructor throws.

# Complexity

Linear O(N).

static_vector
const &
const allocator_type &
static_vector
&&
const allocator_type &
const allocator_type &
std::size_t
static_vector
< T, C, O > const &

The static_vector which content will be copied to this one.

Constructs a copy of other static_vector.

# Throws

- If T's copy constructor throws.

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Linear 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.

# Complexity

Linear O(N).

std::size_t
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.

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Linear 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.

# Throws

If T's copy constructor or copy assignment throws.

# Complexity

Linear 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.

# Throws

- If T's copy constructor or copy assignment throws.

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Linear O(N).

`static_vector` & std::size_t ``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.

# Throws

- If T's copy constructor or copy assignment throws.

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Linear 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.

# Complexity

Linear O(N).

`static_vector` & std::size_t ``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.

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Linear O(N).

`other.size() <= capacity()`

Destructor. Destroys Values stored in this container.

# Throws

Nothing

# Complexity

Linear O(N).

void ``static_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,

# Complexity

Linear O(N).

void std::size_t ``static_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,

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Linear O(N).

`other.size() <= capacity() && size() <= other.capacity()`

void `size_type

The 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.

# Throws

- If T's value initialization throws.

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Linear O(N).

`count <= capacity()`

void `size_type

The number of elements which will be stored in the container.

` ``default_init_t`` Inserts or erases elements at the end such that the size becomes count. New elements are default initialized.

# Throws

- If T's default initialization throws.

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Linear O(N).

# Note

Non-standard extension

`count <= capacity()`

void `size_type

The 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.

# Throws

- If T's copy constructor throws.

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Linear O(N).

`count <= capacity()`

void `size_type

The number of elements which the container should be able to contain.

` This call has no effect because the Capacity of this container is constant.

# Throws

If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Constant O(1).

`count <= capacity()`

void `value_type const &

The value used to copy construct the new element.

` Adds a copy of value at the end.

# Throws

- If T's copy constructor throws.

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Constant O(1).

`size() < capacity()`

void `value_type &&

The value to move construct the new element.

` Moves value to the end.

# Throws

- If T's move constructor throws.

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Constant O(1).

`size() < capacity()`

void Destroys last value and decreases the size.

# Throws

Nothing.

# Complexity

Constant O(1).

`!empty()`

iterator `const_iterator

The 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.

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Constant or linear.

- `p` must be a valid iterator of `*this` in range `[begin(), end()]`.

- `size() < capacity()`

iterator `const_iterator

The 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.

# Throws

- If T's move constructor or move assignment throws.

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Constant or linear.

- `p` must be a valid iterator of `*this` in range `[begin(), end()]`.

- `size() < capacity()`

iterator `const_iterator

The position at which new elements will be inserted.

` `size_type

The 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.

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Linear O(N).

- `p` must be a valid iterator of `*this` in range `[begin(), end()]`.

- `size() + count <= capacity()`

iterator `const_iterator

The position at which new elements will be inserted.

` `Iterator

The iterator to the first element of a range used to construct new elements.

` `Iterator

The 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.

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Linear O(N).

- `p` must be a valid iterator of `*this` in range `[begin(), end()]`.

- `distance(first, last) <= capacity()`

- `Iterator` must meet the `ForwardTraversalIterator` concept.

iterator `const_iterator

The 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.

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Linear O(N).

- `p` must be a valid iterator of `*this` in range `[begin(), end()]`.

- `distance(il.begin(), il.end()) <= capacity()`

iterator `const_iterator

The position of the element which will be erased from the container.

` Erases T from p.

# Throws

If T's move assignment throws.

# Complexity

Linear O(N).

`p` must be a valid iterator of `*this` in range `[begin(), end())`

iterator `const_iterator

The position of the first element of a range which will be erased from the container.

` `const_iterator

The 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)`.

# Throws

If T's move assignment throws.

# Complexity

Linear O(N).

- `first` and `last` must define a valid range

- iterators must be in range `[begin(), end()]`

void `Iterator

The iterator to the first element of a range used to construct new content of this container.

` `Iterator

The 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.

# Throws

- If T's copy constructor or copy assignment throws,

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Linear O(N).

`distance(first, last) <= capacity()`

void `std::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.

# Throws

- If T's copy constructor or copy assignment throws,

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Linear O(N).

`distance(il.begin(), il.end()) <= capacity()`

void `size_type

The 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.

# Throws

- If T's copy constructor or copy assignment throws.

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Linear O(N).

`count <= capacity()`

reference class ... `Args &&...

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.

# Throws

- If in-place constructor throws or T's move constructor throws.

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Constant O(1).

`size() < capacity()`

A reference to the created object.

iterator class ... `const_iterator

The 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.

# Throws

- If in-place constructor throws or if T's move constructor or move assignment throws.

- If `throw_on_overflow<true>` option is set and the container runs out of capacity.

# Complexity

Constant or linear.

- `p` must be a valid iterator of `*this` in range `[begin(), end()]`

- `size() < capacity()`

void Removes all elements from the container.

# Throws

Nothing.

# Complexity

Constant O(1).

reference `size_type

The element's index.

` Returns reference to the i-th element.

# Throws

`out_of_range` exception by default.

# Complexity

Constant O(1).

`i < size()`

reference to the i-th element from the beginning of the container.

const_reference `size_type

The element's index.

` Returns const reference to the i-th element.

# Throws

`out_of_range` exception by default.

# Complexity

Constant O(1).

`i < size()`

const reference to the i-th element from the beginning of the container.

reference `size_type

The element's index.

` Returns reference to the i-th element.

# Throws

Nothing.

# Complexity

Constant O(1).

`i < size()`

reference to the i-th element from the beginning of the container.

const_reference `size_type

The element's index.

` Returns const reference to the i-th element.

# Throws

Nothing.

# Complexity

Constant O(1).

`i < size()`

const reference to the i-th element from the beginning of the container.

iterator `size_type

The element's index.

` Returns a iterator to the i-th element.

# Throws

Nothing.

# Complexity

Constant O(1).

`i =< size()`

a iterator to the i-th element.

const_iterator `size_type

The element's index.

` Returns a const_iterator to the i-th element.

# Throws

Nothing by default.

# Complexity

Constant O(1).

`i =< size()`

a const_iterator to the i-th element.

size_type `iterator

An iterator to the element.

` Returns the index of the element pointed by p.

# Throws

Nothing.

# Complexity

Constant O(1).

`begin() <= p <= end()`

The index of the element pointed by p.

size_type `const_iterator

A const_iterator to the element.

` Returns the index of the element pointed by p.

# Throws

Nothing.

# Complexity

Constant O(1).

`begin() <= p <= end()`

a const_iterator to the i-th element.

reference Returns reference to the first element.

# Throws

Nothing.

# Complexity

Constant O(1).

`!empty`()

reference to the first element from the beginning of the container.

const_reference Returns const reference to the first element.

# Throws

Nothing.

# Complexity

Constant O(1).

`!empty`()

const reference to the first element from the beginning of the container.

reference Returns reference to the last element.

# Throws

Nothing.

# Complexity

Constant O(1).

`!empty`()

reference to the last element from the beginning of the container.

const_reference Returns const reference to the first element.

# Throws

Nothing.

# Complexity

Constant 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()`.

# Throws

Nothing.

# Complexity

Constant O(1).

const T * Const pointer such that `[data(), data() + size())` is a valid range. For a non-empty vector `data() == &front()`.

# Throws

Nothing.

# Complexity

Constant O(1).

iterator Returns iterator to the first element.

# Throws

Nothing.

# Complexity

Constant O(1).

iterator to the first element contained in the vector.

const_iterator Returns const iterator to the first element.

# Throws

Nothing.

# Complexity

Constant O(1).

const_iterator to the first element contained in the vector.

const_iterator Returns const iterator to the first element.

# Throws

Nothing.

# Complexity

Constant O(1).

const_iterator to the first element contained in the vector.

iterator Returns iterator to the one after the last element.

# Throws

Nothing.

# Complexity

Constant O(1).

iterator pointing to the one after the last element contained in the vector.

const_iterator Returns const iterator to the one after the last element.

# Throws

Nothing.

# Complexity

Constant O(1).

const_iterator pointing to the one after the last element contained in the vector.

const_iterator Returns const iterator to the one after the last element.

# Throws

Nothing.

# Complexity

Constant O(1).

const_iterator pointing to the one after the last element contained in the vector.

reverse_iterator Returns reverse iterator to the first element of the reversed container.

# Throws

Nothing.

# Complexity

Constant O(1).

reverse_iterator pointing to the beginning of the reversed static_vector.

const_reverse_iterator Returns const reverse iterator to the first element of the reversed container.

# Throws

Nothing.

# Complexity

Constant O(1).

const_reverse_iterator pointing to the beginning of the reversed static_vector.

const_reverse_iterator Returns const reverse iterator to the first element of the reversed container.

# Throws

Nothing.

# Complexity

Constant O(1).

const_reverse_iterator pointing to the beginning of the reversed static_vector.

reverse_iterator Returns reverse iterator to the one after the last element of the reversed container.

# Throws

Nothing.

# Complexity

Constant O(1).

reverse_iterator pointing to the one after the last element of the reversed static_vector.

const_reverse_iterator Returns const reverse iterator to the one after the last element of the reversed container.

# Throws

Nothing.

# Complexity

Constant O(1).

const_reverse_iterator pointing to the one after the last element of the reversed static_vector.

const_reverse_iterator Returns const reverse iterator to the one after the last element of the reversed container.

# Throws

Nothing.

# Complexity

Constant O(1).

const_reverse_iterator pointing to the one after the last element of the reversed static_vector.

size_type Returns the number of stored elements.

# Throws

Nothing.

# Complexity

Constant O(1).

Number of elements contained in the container.

bool Queries if the container contains elements.

# Throws

Nothing.

# Complexity

Constant O(1).

true if the number of elements contained in the container is equal to 0.

size_type Returns container's capacity.

# Throws

Nothing.

# Complexity

Constant O(1).

container's capacity.

size_type Returns container's capacity.

# Throws

Nothing.

# Complexity

Constant O(1).

container's capacity.

bool std::size_t std::size_t ``static_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.

# Complexity

Linear O(N).

`true` if containers have the same size and elements in both containers are equal.

bool std::size_t std::size_t ``static_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.

# Complexity

Linear O(N).

`true` if containers have different size or elements in both containers are not equal.

bool std::size_t std::size_t ``static_vector`< V, C1, O1 > const &

The first static_vector.

` ``static_vector`< V, C2, O2 > const &

The second static_vector.

` Lexicographically compares static_vectors.

# Complexity

Linear O(N).

`true` if x compares lexicographically less than y.

bool std::size_t std::size_t ``static_vector`< V, C1, O1 > const &

The first static_vector.

` ``static_vector`< V, C2, O2 > const &

The second static_vector.

` Lexicographically compares static_vectors.

# Complexity

Linear O(N).

`true` if y compares lexicographically less than x.

bool std::size_t std::size_t ``static_vector`< V, C1, O1 > const &

The first static_vector.

` ``static_vector`< V, C2, O2 > const &

The second static_vector.

` Lexicographically compares static_vectors.

# Complexity

Linear O(N).

`true` if y don't compare lexicographically less than x.

bool std::size_t std::size_t ``static_vector`< V, C1, O1 > const &

The first static_vector.

` ``static_vector`< V, C2, O2 > const &

The second static_vector.

` Lexicographically compares static_vectors.

# Complexity

Linear O(N).

`true` if x don't compare lexicographically less than y.

void std::size_t std::size_t ``static_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().

# Complexity

Linear O(N).

std::char_traits<CharT>

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

The type of character it contains.

std::char_traits<CharT>

The Character Traits type, which encapsulates basic character operations

void

The allocator, used for internal memory management.

dtl::basic_string_base< real_allocator< CharT, void >::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
BOOST_STATIC_CONSTEXPR size_type

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.

template< class, class > class
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_type
size_type
npos

Effects: 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_type
size_type
const 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_type

Effects: 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_type
const 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_type
CharT

Effects: Constructs a basic_string with a default-constructed allocator, and is initialized by n copies of c.

size_type
CharT
const allocator_type &

Effects: Constructs a basic_string taking the allocator as parameter, and is initialized by n copies of c.

size_type
default_init_t

Effects: Constructs a basic_string with a default-constructed allocator, and is initialized by n default-initialized characters.

size_type
default_init_t
const allocator_type &

Effects: Constructs a basic_string taking the allocator as parameter, and is initialized by n default-initialized characters.

InputIterator
InputIterator

Effects: Constructs a basic_string with a default-constructed allocator, and a range of iterators.

InputIterator
InputIterator
const 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 throws

Complexity: 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` & `CharT`

Effects: Returns *this = basic_string(1, c).

`basic_string` & template< class, class > class `BasicStringView< CharT, Traits >`

Effects: Equivalent to return assign(sv).

`basic_string` & `std::initializer_list< CharT >`

Effects: Returns *this = basic_string(il);

allocator_type

Effects: 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: Nothing

Complexity: Constant.

Note: Non-standard extension.

const stored_allocator_type &

Effects: Returns a reference to the internal allocator.

Throws: Nothing

Complexity: Constant.

Note: Non-standard extension.

iterator

Effects: Returns an iterator to the first element contained in the vector.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the vector.

Throws: Nothing.

Complexity: Constant.

iterator

Effects: Returns an iterator to the end of the vector.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the vector.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the beginning of the reversed vector.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed vector.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the end of the reversed vector.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed vector.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the vector.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the vector.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed vector.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed vector.

Throws: Nothing.

Complexity: Constant.

bool

Effects: Returns true if the vector contains no elements.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the number of the elements contained in the vector.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the number of the elements contained in the vector.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the largest possible size of the vector.

Throws: Nothing.

Complexity: Constant

void `size_type` `CharT`

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

Complexity: Linear to the difference between size() and new_size.

void `size_type`

Effects: Inserts or erases elements at the end such that the size becomes n. New elements are value initialized.

Throws: If memory allocation throws

Complexity: Linear to the difference between size() and new_size.

void `size_type` ``default_init_t``

Effects: Inserts or erases elements at the end such that the size becomes n. New elements are uninitialized.

Throws: If memory allocation throws

Complexity: Linear to the difference between size() and new_size.

Note: Non-standard extension

size_type

Effects: Number of elements for which memory has been allocated. capacity() is always greater than or equal to size().

Throws: Nothing.

Complexity: Constant.

void `size_type`

Effects: If n is less than or equal to capacity(), this call has no effect. Otherwise, it is a request for allocation of additional memory. If the request is successful, then capacity() is greater than or equal to n; otherwise, capacity() is unchanged. In either case, size() is unchanged.

Throws: If memory allocation allocation throws

void

Effects: Tries to deallocate the excess of memory created with previous allocations. The size of the string is unchanged

Throws: Nothing

Complexity: Linear to size().

reference

Requires: !empty()

Effects: Returns a reference to the first element of the container.

Throws: Nothing.

Complexity: Constant.

const_reference

Requires: !empty()

Effects: Returns a const reference to the first element of the container.

Throws: Nothing.

Complexity: Constant.

reference

Requires: !empty()

Effects: Returns a reference to the last element of the container.

Throws: Nothing.

Complexity: Constant.

const_reference

Requires: !empty()

Effects: Returns a const reference to the last element of the container.

Throws: Nothing.

Complexity: Constant.

reference `size_type`

Requires: size() > n.

Effects: Returns a reference to the nth element from the beginning of the container.

Throws: Nothing.

Complexity: Constant.

const_reference `size_type`

Requires: size() > n.

Effects: Returns a const reference to the nth element from the beginning of the container.

Throws: Nothing.

Complexity: Constant.

reference `size_type`

Requires: size() > n.

Effects: Returns a reference to the nth element from the beginning of the container.

Throws: range_error if n >= size()

Complexity: Constant.

const_reference `size_type`

Requires: size() > n.

Effects: Returns a const reference to the nth element from the beginning of the container.

Throws: range_error if n >= size()

Complexity: Constant.

`basic_string` & `const `basic_string` &`

Effects: Calls append(str.data, str.size()).

Returns: *this

`basic_string` & template< class, class > class `BasicStringView< CharT, Traits >`

Effects: Same as `return append(sv)`.

`basic_string` & `const CharT *`

Effects: Calls append(s).

Returns: *this

`basic_string` & `CharT`

Effects: 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` & template< class, class > class `BasicStringView< CharT, Traits >`

Effects: Same as return append(sv.data(), sv.size()).

`basic_string` & `const `basic_string` &` `size_type` `size_typenpos`

Requires: 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_type`

Requires: 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_type` `CharT`

Effects: Equivalent to append(basic_string(n, c)).

Returns: *this

`basic_string` & `InputIter` `InputIter`

Requires: [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()).

void `CharT`

Effects: 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` & template< class, class > class `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: Nothing

Returns: *this

`basic_string` & `const `basic_string` &` `size_type` `size_type`

Requires: 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_type`

Requires: 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_type` `CharT`

Effects: 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` & `InputIter` `InputIter`

Effects: 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_type` `const `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_type` `const `basic_string` &` `size_type` `size_typenpos`

Requires: 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_type` `const CharT *` `size_type`

Requires: 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_type` `const CharT *`

Requires: pos <= size() and s points to an array of at least traits::length(s) + 1 elements of CharT

Effects: 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_type` `size_type` `CharT`

Effects: 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() - n

Returns: *this

`basic_string` & template< class, class > class `size_type` `BasicStringView< CharT, Traits >`

Effects: Same as `return insert(pos, sv.data(), sv.size())`.

iterator `const_iterator` `CharT`

Requires: 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.

iterator `const_iterator` `size_type` `CharT`

Requires: 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.

iterator `const_iterator` `InputIter` `InputIter`

Requires: 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.

iterator `const_iterator` `std::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.

void

Effects: Removes the last element from the container.

Throws: Nothing.

Complexity: Constant time.

`basic_string` & `size_type0` `size_typenpos`

Requires: 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

iterator `const_iterator`

Effects: Removes the character referred to by p.

Throws: Nothing

Returns: An iterator which points to the element immediately following p prior to the element being erased. If no such element exists, end() is returned.

iterator `const_iterator` `const_iterator`

Requires: first and last are valid iterators on *this, defining a range [first,last).

Effects: Removes the characters in the range [first,last).

Throws: Nothing

Returns: 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.

void

Effects: Erases all the elements of the vector.

Throws: Nothing.

Complexity: Linear to the number of elements in the vector.

`basic_string` & `size_type` `size_type` `const `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` & template< class, class > class `size_type` `size_type` `BasicStringView< CharT, Traits >`

Effects: Calls `return replace(pos1, n1, sv.data(), sv.size());`.

`basic_string` & `size_type` `size_type` `const `basic_string` &` `size_type` `size_typenpos`

Requires: 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` & template< class, class > class `size_type` `size_type` `BasicStringView< CharT, Traits >` `size_type` `size_typenpos`

Throws: 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_type` `size_type` `const CharT *` `size_type`

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_type` `size_type` `const 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_type` `size_type` `size_type` `CharT`

Requires: 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_iterator` `const_iterator` `const `basic_string` &`

Requires: [begin(),i1) and [i1,i2) are valid ranges.

Effects: Calls replace(i1 - begin(), i2 - i1, str).

Throws: if memory allocation throws

Returns: *this

`basic_string` & `const_iterator` `const_iterator` `const CharT *` `size_type`

Requires: [begin(),i1) and [i1,i2) are valid ranges and s points to an array of at least n elements

Effects: Calls replace(i1 - begin(), i2 - i1, s, n).

Throws: if memory allocation throws

Returns: *this

`basic_string` & `const_iterator` `const_iterator` `const 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 throws

Returns: *this

`basic_string` & `const_iterator` `const_iterator` `size_type` `CharT`

Requires: [begin(),i1) and [i1,i2) are valid ranges.

Effects: Calls replace(i1 - begin(), i2 - i1, basic_string(n, c)).

Throws: if memory allocation throws

Returns: *this

`basic_string` & `const_iterator` `const_iterator` `InputIter` `InputIter`

Requires: [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 throws

Returns: *this

`basic_string` & template< class, class > class `const_iterator` `const_iterator` `BasicStringView< CharT, Traits >`

Requires: [begin(), i1) and [i1, i2) are valid ranges.

Effects: Calls `replace(i1 - begin(), i2 - i1, sv).`.

Returns: *this.

`basic_string` & `const_iterator` `const_iterator` `std::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_type `CharT *` `size_type` `size_type0`

Requires: 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

void ``basic_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 > template< class, class > class

Returns: a string_view to the characters in the string.

Complexity: constant time.

BasicStringView

Returns: 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_type `const `basic_string` &` `size_type0`

Effects: 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: Nothing

Returns: xpos if the function can determine such a value for xpos. Otherwise, returns npos.

size_type template< class, class > class `BasicStringView< CharT, Traits >` `size_type0`

Effects: 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: Nothing

Returns: xpos if the function can determine such a value for xpos. Otherwise, returns npos.

size_type `const CharT *` `size_type` `size_type`

Requires: s points to an array of at least n elements of CharT.

Throws: Nothing

Returns: find(basic_string<CharT,traits,allocator_type>(s,n),pos).

size_type `const CharT *` `size_type0`

Requires: s points to an array of at least traits::length(s) + 1 elements of CharT.

Throws: Nothing

Returns: find(basic_string(s), pos).

size_type `CharT` `size_type0`

Throws: Nothing

Returns: find(basic_string<CharT,traits,allocator_type>(1,c), pos).

size_type `const `basic_string` &` `size_typenpos`

Effects: 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: Nothing

Returns: xpos if the function can determine such a value for xpos. Otherwise, returns npos.

size_type template< class, class > class `BasicStringView< CharT, Traits >` `size_typenpos`

Effects: 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: Nothing

Returns: xpos if the function can determine such a value for xpos. Otherwise, returns npos.

size_type `const CharT *` `size_type` `size_type`

Requires: s points to an array of at least n elements of CharT.

Throws: Nothing

Returns: rfind(basic_string(s, n), pos).

size_type `const CharT *` `size_typenpos`

Requires: pos <= size() and s points to an array of at least traits::length(s) + 1 elements of CharT.

Throws: Nothing

Returns: rfind(basic_string(s), pos).

size_type `CharT` `size_typenpos`

Throws: Nothing

Returns: rfind(basic_string<CharT,traits,allocator_type>(1,c),pos).

size_type `const `basic_string` &` `size_type0`

Effects: 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: Nothing

Returns: xpos if the function can determine such a value for xpos. Otherwise, returns npos.

size_type template< class, class > class `BasicStringView< CharT, Traits >` `size_type0`

Effects: 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: Nothing

Returns: xpos if the function can determine such a value for xpos. Otherwise, returns npos.

size_type `const CharT *` `size_type` `size_type`

Requires: s points to an array of at least n elements of CharT.

Throws: Nothing

Returns: find_first_of(basic_string(s, n), pos).

size_type `const CharT *` `size_type0`

Requires: s points to an array of at least traits::length(s) + 1 elements of CharT.

Throws: Nothing

Returns: find_first_of(basic_string(s), pos).

size_type `CharT` `size_type0`

Requires: s points to an array of at least traits::length(s) + 1 elements of CharT.

Throws: Nothing

Returns: find_first_of(basic_string<CharT,traits,allocator_type>(1,c), pos).

size_type `const `basic_string` &` `size_typenpos`

Effects: 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: Nothing

Returns: xpos if the function can determine such a value for xpos. Otherwise, returns npos.

size_type template< class, class > class `BasicStringView< CharT, Traits >` `size_typenpos`

Effects: 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: Nothing

Returns: xpos if the function can determine such a value for xpos. Otherwise, returns npos.

size_type `const CharT *` `size_type` `size_type`

Requires: s points to an array of at least n elements of CharT.

Throws: Nothing

Returns: find_last_of(basic_string(s, n), pos).

size_type `const CharT *` `size_typenpos`

Requires: s points to an array of at least traits::length(s) + 1 elements of CharT.

Throws: Nothing

Returns: find_last_of(basic_string<CharT,traits,allocator_type>(1,c),pos).

size_type `CharT` `size_typenpos`

Throws: Nothing

Returns: find_last_of(basic_string(s), pos).

size_type `const `basic_string` &` `size_type0`

Effects: 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: Nothing

Returns: xpos if the function can determine such a value for xpos. Otherwise, returns npos.

size_type template< class, class > class `BasicStringView< CharT, Traits >` `size_type0`

Effects: 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: Nothing

Returns: xpos if the function can determine such a value for xpos. Otherwise, returns npos.

size_type `const CharT *` `size_type` `size_type`

Requires: s points to an array of at least traits::length(s) + 1 elements of CharT.

Throws: Nothing

Returns: find_first_not_of(basic_string(s, n), pos).

size_type `const CharT *` `size_type0`

Requires: s points to an array of at least traits::length(s) + 1 elements of CharT.

Throws: Nothing

Returns: find_first_not_of(basic_string(s), pos).

size_type `CharT` `size_type0`

Throws: Nothing

Returns: find_first_not_of(basic_string(1, c), pos).

size_type `const `basic_string` &` `size_typenpos`

Effects: 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: Nothing

Returns: xpos if the function can determine such a value for xpos. Otherwise, returns npos.

size_type template< class, class > class `BasicStringView< CharT, Traits >` `size_typenpos`

Effects: 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: Nothing

Returns: xpos if the function can determine such a value for xpos. Otherwise, returns npos.

size_type `const CharT *` `size_type` `size_type`

Requires: s points to an array of at least n elements of CharT.

Throws: Nothing

Returns: find_last_not_of(basic_string(s, n), pos).

size_type `const CharT *` `size_typenpos`

Requires: s points to an array of at least traits::length(s) + 1 elements of CharT.

Throws: Nothing

Returns: find_last_not_of(basic_string(s), pos).

size_type `CharT` `size_typenpos`

Throws: Nothing

Returns: find_last_not_of(basic_string(1, c), pos).

`basic_string` `size_type0` `size_typenpos`

Requires: 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).

int `const `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: Nothing

Returns: 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()

int template< class, class > class `BasicStringView< CharT, Traits >`

Throws: Nothing

Returns: compare(basic_string(sv)).

int `size_type` `size_type` `const `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).

int template< class, class > class `size_type` `size_type` `BasicStringView< CharT, Traits >`

Requires: pos1 <= size()

Throws: out_of_range if pos1 > size()

Returns:basic_string(*this,pos1,n1).compare(sv).

int `size_type` `size_type` `const `basic_string` &` `size_type` `size_typenpos`

Requires: pos1 <= size() and pos2 <= str.size()

Effects: Determines the effective length rlen of the string to copy as the smaller of

Throws: out_of_range if pos1 > size() or pos2 > str.size()

Returns: basic_string(*this, pos1, n1).compare(basic_string(str, pos2, n2)).

int template< class, class > class `size_type` `size_type` `BasicStringView< CharT, Traits >` `size_type` `size_type`

Requires: pos1 <= size() and pos2 <= str.size()

Effects: Determines the effective length rlen of the string to copy as the smaller of

Throws: out_of_range if pos1 > size() or pos2 > sv.size()

Returns: basic_string(*this, pos1, n1).compare(BasicStringView<CharT, Traits>(sv, pos2, n2)).

int `const CharT *`

Throws: Nothing

Returns: compare(basic_string(s)).

int `size_type` `size_type` `const CharT *` `size_type`

Requires: 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)).

int `size_type` `size_type` `const 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)).

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 > >
InputIterator
InputIterator
InputIterator
InputIterator
Allocator 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 > `CharT` ``basic_string`< CharT, Traits, Allocator >`
`basic_string`< CharT, Traits, Allocator > ``basic_string`< CharT, Traits, Allocator >` `const CharT`
bool `const `basic_string`< CharT, Traits, Allocator > &` `const `basic_string`< CharT, Traits, Allocator > &`
bool `const CharT *` `const `basic_string`< CharT, Traits, Allocator > &`
bool `const `basic_string`< CharT, Traits, Allocator > &` `const CharT *`
bool template< class, class > class `BasicStringView< CharT, Traits >` `const `basic_string`< CharT, Traits, Allocator > &`
bool template< class, class > class `const `basic_string`< CharT, Traits, Allocator > &` `BasicStringView< CharT, Traits >`
bool `const `basic_string`< CharT, Traits, Allocator > &` `const `basic_string`< CharT, Traits, Allocator > &`
bool `const CharT *` `const `basic_string`< CharT, Traits, Allocator > &`
bool `const `basic_string`< CharT, Traits, Allocator > &` `const CharT *`
bool template< class, class > class `BasicStringView< CharT, Traits >` `const `basic_string`< CharT, Traits, Allocator > &`
bool template< class, class > class `const `basic_string`< CharT, Traits, Allocator > &` `BasicStringView< CharT, Traits >`
bool `const `basic_string`< CharT, Traits, Allocator > &` `const `basic_string`< CharT, Traits, Allocator > &`
bool `const CharT *` `const `basic_string`< CharT, Traits, Allocator > &`
bool `const `basic_string`< CharT, Traits, Allocator > &` `const CharT *`
bool template< class, class > class `BasicStringView< CharT, Traits >` `const `basic_string`< CharT, Traits, Allocator > &`
bool template< class, class > class `const `basic_string`< CharT, Traits, Allocator > &` `BasicStringView< CharT, Traits >`
bool `const `basic_string`< CharT, Traits, Allocator > &` `const `basic_string`< CharT, Traits, Allocator > &`
bool `const CharT *` `const `basic_string`< CharT, Traits, Allocator > &`
bool `const `basic_string`< CharT, Traits, Allocator > &` `const CharT *`
bool template< class, class > class `BasicStringView< CharT, Traits >` `const `basic_string`< CharT, Traits, Allocator > &`
bool template< class, class > class `const `basic_string`< CharT, Traits, Allocator > &` `BasicStringView< CharT, Traits >`
bool `const `basic_string`< CharT, Traits, Allocator > &` `const `basic_string`< CharT, Traits, Allocator > &`
bool `const CharT *` `const `basic_string`< CharT, Traits, Allocator > &`
bool `const `basic_string`< CharT, Traits, Allocator > &` `const CharT *`
bool template< class, class > class `BasicStringView< CharT, Traits >` `const `basic_string`< CharT, Traits, Allocator > &`
bool template< class, class > class `const `basic_string`< CharT, Traits, Allocator > &` `BasicStringView< CharT, Traits >`
bool `const `basic_string`< CharT, Traits, Allocator > &` `const `basic_string`< CharT, Traits, Allocator > &`
bool `const CharT *` `const `basic_string`< CharT, Traits, Allocator > &`
bool `const `basic_string`< CharT, Traits, Allocator > &` `const CharT *`
bool template< class, class > class `BasicStringView< CharT, Traits >` `const `basic_string`< CharT, Traits, Allocator > &`
bool template< class, class > class `const `basic_string`< CharT, Traits, Allocator > &` `BasicStringView< CharT, Traits >`
void ``basic_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 > &`
boost::container::exception
std::exception
const char *
const char *
boost::container::exception
const char *
boost::container::exception
const char *
boost::container::exception
const char *
boost::container::exception
const char *
bad_alloc
out_of_range
length_error
logic_error
runtime_error
void

Exception callback called by Boost.Container when fails to allocate the requested storage space.

- If BOOST_NO_EXCEPTIONS is NOT defined and BOOST_CONTAINER_USE_STD_EXCEPTIONS is NOT defined `boost::container::bad_alloc(str)` is thrown.

- If BOOST_NO_EXCEPTIONS is NOT defined and BOOST_CONTAINER_USE_STD_EXCEPTIONS is defined `std::bad_alloc(str)` 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.

void `const char *`

Exception callback called by Boost.Container to signal arguments out of range.

- If BOOST_NO_EXCEPTIONS is NOT defined and BOOST_CONTAINER_USE_STD_EXCEPTIONS is NOT defined `boost::container::out_of_range(str)` is thrown.

- If BOOST_NO_EXCEPTIONS is NOT defined and BOOST_CONTAINER_USE_STD_EXCEPTIONS is 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.

void `const char *`

Exception callback called by Boost.Container to signal errors resizing.

- If BOOST_NO_EXCEPTIONS is NOT defined and BOOST_CONTAINER_USE_STD_EXCEPTIONS is NOT defined `boost::container::length_error(str)` is thrown.

- If BOOST_NO_EXCEPTIONS is NOT defined and BOOST_CONTAINER_USE_STD_EXCEPTIONS is 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.

void `const 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 and BOOST_CONTAINER_USE_STD_EXCEPTIONS is NOT defined `boost::container::logic_error(str)` is thrown.

- If BOOST_NO_EXCEPTIONS is NOT defined and BOOST_CONTAINER_USE_STD_EXCEPTIONS is 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.

void `const char *`

Exception callback called by Boost.Container to report errors that can only be detected during runtime.

- If BOOST_NO_EXCEPTIONS is NOT defined and BOOST_CONTAINER_USE_STD_EXCEPTIONS is NOT defined `boost::container::runtime_error(str)` is thrown.

- If BOOST_NO_EXCEPTIONS is NOT defined and BOOST_CONTAINER_USE_STD_EXCEPTIONS is 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.

BOOST_STATIC_CONSTEXPR 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.

BOOST_STATIC_CONSTEXPR 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_t

A instance of type allocator_arg_t

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 > >

The type of object that is stored in the vector

void

The allocator used for all internal memory management, use void for the default allocator

void

A type produced from `boost::container::vector_options`.

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

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: Nothing

Complexity: Constant.

size_type

Effects: 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_type
const 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_type
default_init_t

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_type
default_init_t
const 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_type
const 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_type
const 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.

InIt
InIt 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).

InIt
InIt
const 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: Nothing

Complexity: 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 vector

Throws: 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 &

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.

void `InIt` `InIt 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.

void `std::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.

void `FwdIt` `FwdIt 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.

void `size_type` `const 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_type

Effects: 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: Nothing

Complexity: Constant.

Note: Non-standard extension.

const stored_allocator_type &

Effects: Returns a reference to the internal allocator.

Throws: Nothing

Complexity: Constant.

Note: Non-standard extension.

iterator

Effects: Returns an iterator to the first element contained in the vector.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the vector.

Throws: Nothing.

Complexity: Constant.

iterator

Effects: Returns an iterator to the end of the vector.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the vector.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the beginning of the reversed vector.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed vector.

Throws: Nothing.

Complexity: Constant.

reverse_iterator

Effects: Returns a reverse_iterator pointing to the end of the reversed vector.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed vector.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the first element contained in the vector.

Throws: Nothing.

Complexity: Constant.

const_iterator

Effects: Returns a const_iterator to the end of the vector.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed vector.

Throws: Nothing.

Complexity: Constant.

const_reverse_iterator

Effects: Returns a const_reverse_iterator pointing to the end of the reversed vector.

Throws: Nothing.

Complexity: Constant.

bool

Effects: Returns true if the vector contains no elements.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the number of the elements contained in the vector.

Throws: Nothing.

Complexity: Constant.

size_type

Effects: Returns the largest possible size of the vector.

Throws: Nothing.

Complexity: Constant.

void `size_type`

Effects: Inserts or erases elements at the end such that the size becomes n. New elements are value initialized.

Throws: If memory allocation throws, or T's copy/move or value initialization throws.

Complexity: Linear to the difference between size() and new_size.

void `size_type` ``default_init_t``

Effects: Inserts or erases elements at the end such that the size becomes n. New elements are default initialized.

Throws: If memory allocation throws, or T's copy/move or default initialization throws.

Complexity: Linear to the difference between size() and new_size.

Note: Non-standard extension

void `size_type` `const 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_type

Effects: Number of elements for which memory has been allocated. capacity() is always greater than or equal to size().

Throws: Nothing.

Complexity: Constant.

void `size_type`

Effects: If n is less than or equal to capacity(), this call has no effect. Otherwise, it is a request for allocation of additional memory. If the request is successful, then capacity() is greater than or equal to n; otherwise, capacity() is unchanged. In either case, size() is unchanged.

Throws: If memory allocation allocation throws or T's copy/move constructor throws.

void

Effects: Tries to deallocate the excess of memory created with previous allocations. The size of the vector is unchanged

Throws: If memory allocation throws, or T's copy/move constructor throws.

Complexity: Linear to size().

reference

Requires: !empty()

Effects: Returns a reference to the first element of the container.

Throws: Nothing.

Complexity: Constant.

const_reference

Requires: !empty()

Effects: Returns a const reference to the first element of the container.

Throws: Nothing.

Complexity: Constant.

reference

Requires: !empty()

Effects: Returns a reference to the last element of the container.

Throws: Nothing.

Complexity: Constant.

const_reference

Requires: !empty()

Effects: Returns a const reference to the last element of the container.

Throws: Nothing.

Complexity: Constant.

reference `size_type`

Requires: size() > n.

Effects: Returns a reference to the nth element from the beginning of the container.

Throws: Nothing.

Complexity: Constant.

const_reference `size_type`

Requires: size() > n.

Effects: Returns a const reference to the nth element from the beginning of the container.

Throws: Nothing.

Complexity: Constant.

iterator `size_type`

Requires: size() >= n.

Effects: Returns an iterator to the nth element from the beginning of the container. Returns end() if n == size().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

const_iterator `size_type`

Requires: size() >= n.

Effects: Returns a const_iterator to the nth element from the beginning of the container. Returns end() if n == size().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

size_type `iterator`

Requires: begin() <= p <= end().

Effects: Returns the index of the element pointed by p and size() if p == end().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

size_type `const_iterator`

Requires: begin() <= p <= end().

Effects: Returns the index of the element pointed by p and size() if p == end().

Throws: Nothing.

Complexity: Constant.

Note: Non-standard extension

reference `size_type`

Requires: size() > n.

Effects: Returns a reference to the nth element from the beginning of the container.

Throws: range_error if n >= size()

Complexity: Constant.

const_reference `size_type`

Requires: size() > n.

Effects: Returns a const reference to the nth element from the beginning of the container.

Throws: 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.

reference class ... `Args &&...`

Effects: Inserts an object of type T constructed with std::forward<Args>(args)... in the end of the vector.

Returns: A reference to the created object.

Throws: If memory allocation throws or the in-place constructor throws or T's copy/move constructor throws.

Complexity: Amortized constant time.

bool class ... `Args &&...`

Effects: Inserts an object of type T constructed with std::forward<Args>(args)... in the end of the vector.

Throws: If the in-place constructor throws.

Complexity: Constant time.

Note: Non-standard extension.

iterator class ... `const_iterator` `Args &&...`

Requires: position must be a valid iterator of *this.

Effects: Inserts an object of type T constructed with std::forward<Args>(args)... before position

Throws: If memory allocation throws or the in-place constructor throws or T's copy/move constructor/assignment throws.

Complexity: If position is end(), amortized constant time Linear time otherwise.

void `const 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.

void `T &&`

Effects: Constructs a new element in the end of the vector and moves the resources of x to this new element.

Throws: If memory allocation throws or T's copy/move constructor throws.

Complexity: Amortized constant time.

iterator `const_iterator` `const 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.

iterator `const_iterator` `T &&`

Requires: position must be a valid iterator of *this.

Effects: Insert a new element before position with x's resources.

Throws: If memory allocation throws.

Complexity: If position is end(), amortized constant time Linear time otherwise.

iterator `const_iterator` `size_type` `const 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.

iterator `const_iterator` `InIt` `InIt`

Requires: p must be a valid iterator of *this.

Effects: Insert a copy of the [first, last) range before pos.

Returns: an iterator to the first inserted element or pos if first == last.

Throws: If memory allocation throws, T's constructor from a dereferenced InpIt throws or T's copy/move constructor/assignment throws.

Complexity: Linear to boost::container::iterator_distance [first, last).

iterator `const_iterator` `std::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()).

void

Effects: Removes the last element from the container.

Throws: Nothing.

Complexity: Constant time.

iterator `const_iterator`

Effects: Erases the element at position pos.

Throws: Nothing.

Complexity: Linear to the elements between pos and the last element. Constant if pos is the last element.

iterator `const_iterator` `const_iterator`

Effects: Erases the elements pointed by [first, last).

Throws: Nothing.

Complexity: Linear to the distance between first and last plus linear to the elements between pos and the last element.

void ``vector` &`

Effects: Swaps the contents of *this and x.

Throws: Nothing.

Complexity: Constant.

void

Effects: Erases all the elements of the vector. Leaves the capacity() of the vector unchanged.

Throws: Nothing.

Complexity: Linear to the number of elements in the container.

bool `const `vector` &` `const `vector` &`

Effects: Returns true if x and y are equal

Complexity: Linear to the number of elements in the container.

bool `const `vector` &` `const `vector` &`

Effects: Returns true if x and y are unequal

Complexity: Linear to the number of elements in the container.

bool `const `vector` &` `const `vector` &`

Effects: Returns true if x is less than y

Complexity: Linear to the number of elements in the container.

bool `const `vector` &` `const `vector` &`

Effects: Returns true if x is greater than y

Complexity: Linear to the number of elements in the container.

bool `const `vector` &` `const `vector` &`

Effects: Returns true if x is equal or less than y

Complexity: Linear to the number of elements in the container.

bool `const `vector` &` `const `vector` &`

Effects: Returns true if x is equal or greater than y

Complexity: Linear to the number of elements in the container.

void ``vector` &` ``vector` &`

Effects: x.swap(y)

Complexity: Constant.

InputIterator
InputIterator
InputIterator
InputIterator
Allocator const &