Subclause | Header | ||
Requirements | |||
Sequence containers | <array>, <deque>, <forward_list>,
<list>, <vector> | ||
Associative containers | <map>, <set> | ||
Unordered associative containers | <unordered_map>, <unordered_set> | ||
Container adaptors | <queue>, <stack> | ||
Views | <span> |
Expression | Return type | Operational | Assertion/note | Complexity | |
semantics | pre-/post-condition | ||||
X::value_type | T | compile time | |||
X::reference | T& | compile time | |||
X::const_reference | const T& | compile time | |||
X::iterator | iterator type whose value type is T | compile time | |||
X::const_iterator | constant iterator type whose value type is T | any iterator category
that meets the forward iterator requirements. | compile time | ||
X::difference_type | signed integer type | is identical to the difference type of X::iterator and X::const_iterator | compile time | ||
X::size_type | unsigned integer type | size_type can represent any non-negative value of difference_type | compile time | ||
X u; | Postconditions: u.empty() | constant | |||
X() | Postconditions: X().empty() | constant | |||
X(a) | linear | ||||
X u(a); X u = a; | Postconditions: u == a | linear | |||
X u(rv); X u = rv; | Postconditions: u is equal to the value that rv had before this construction | (Note B) | |||
a = rv | X& | All existing elements of a are either move assigned to or destroyed | Postconditions: a is equal to the value that rv
had before this assignment | linear | |
a.~X() | void | Effects: destroys every element of a; any memory obtained is deallocated. | linear | ||
a.begin() | iterator; const_iterator for constant a | constant | |||
a.end() | iterator; const_iterator for constant a | constant | |||
a.cbegin() | const_iterator | const_cast<X const&>(a).begin(); | constant | ||
a.cend() | const_iterator | const_cast<X const&>(a).end(); | constant | ||
i <=> j | strong_ordering | Constraints: X::iterator meets the random access iterator requirements. | constant | ||
a == b | convertible to bool | == is an equivalence relation. equal(a.begin(), a.end(), b.begin(), b.end()) | Preconditions: T meets the Cpp17EqualityComparable requirements | Constant if a.size() != b.size(),
linear otherwise | |
a != b | convertible to bool | Equivalent to !(a == b) | linear | ||
a.swap(b) | void | Effects: exchanges the contents of a and b | (Note A) | ||
swap(a, b) | void | Equivalent to a.swap(b) | (Note A) | ||
r = a | X& | Postconditions: r == a. | linear | ||
a.size() | size_type | distance(a.begin(), a.end()) | constant | ||
a.max_size() | size_type | distance(begin(), end())
for the largest possible container | constant | ||
a.empty() | convertible to bool | a.begin() == a.end() | constant |
Expression | Return type | Assertion/note | Complexity | |
pre-/post-condition | ||||
X::reverse_iterator | iterator type whose value type is T | reverse_iterator<iterator> | compile time | |
X::const_reverse_iterator | constant iterator type whose value type is T | reverse_iterator<const_iterator> | compile time | |
a.rbegin() | reverse_iterator; const_reverse_iterator for constant a | reverse_iterator(end()) | constant | |
a.rend() | reverse_iterator; const_reverse_iterator for constant a | reverse_iterator(begin()) | constant | |
a.crbegin() | const_reverse_iterator | const_cast<X const&>(a).rbegin() | constant | |
a.crend() | const_reverse_iterator | const_cast<X const&>(a).rend() | constant |
Expression | Return type | Operational | Assertion/note | Complexity | |
semantics | pre-/post-condition | ||||
a <=> b | synth-three-way-result<value_type> | lexicographical_compare_three_way(a.begin(), a.end(),
b.begin(), b.end(), synth-three-way) | Preconditions: Either <=> is defined for values of type (possibly const) T,
or < is defined for values of type (possibly const) T and
< is a total ordering relationship. | linear |
Expression | Return type | Assertion/note | Complexity | |
pre-/post-condition | ||||
allocator_type | A | compile time | ||
get_- allocator() | A | constant | ||
X() X u; | Preconditions: A meets the Cpp17DefaultConstructible requirements. Postconditions: u.empty() returns true, u.get_allocator() == A() | constant | ||
X(m) | Postconditions: u.empty() returns true, | constant | ||
X u(m); | u.get_allocator() == m | |||
X(t, m) X u(t, m); | Postconditions: u == t, u.get_allocator() == m | linear | ||
X(rv) X u(rv); | Postconditions: u has the same elements as rv had before this
construction; the value of u.get_allocator() is the same as the
value of rv.get_allocator() before this construction. | constant | ||
X(rv, m) X u(rv, m); | Postconditions: u has the same elements, or copies of the elements, that rv had before this construction, u.get_allocator() == m | constant if m == rv.get_allocator(), otherwise linear | ||
a = t | X& | Postconditions: a == t | linear | |
a = rv | X& | Preconditions: If allocator_- traits<allocator_type> ::propagate_on_container_- move_assignment::value is false, T is Cpp17MoveInsertable into X and Cpp17MoveAssignable. | linear | |
a.swap(b) | void | Effects: exchanges the contents of a and b | constant |
Expression | Return type | Assertion/note | |
pre-/post-condition | |||
X(n, t) X u(n, t); | Postconditions: distance(begin(), end()) == n Effects: Constructs a sequence container with n copies of t | ||
X(i, j) X u(i, j); | For vector, if the iterator does
not meet the Cpp17ForwardIterator requirements ([forward.iterators]), T
is also
Cpp17MoveInsertable into X. Postconditions: distance(begin(), end()) == distance(i, j) Effects: Constructs a sequence container equal to the range [i, j). Each iterator in the range [i, j) is dereferenced exactly once. | ||
X(il) | Equivalent to X(il.begin(), il.end()) | ||
a = il | X& | ||
a.emplace(p, args) | iterator | ||
a.insert(p,t) | iterator | ||
a.insert(p,rv) | iterator | ||
a.insert(p,n,t) | iterator | ||
a.insert(p,i,j) | iterator | For vector and deque, T is also
Cpp17MoveInsertable into X, Cpp17MoveConstructible, Cpp17MoveAssignable,
and swappable ([swappable.requirements]). Each iterator in the range [i, j) shall be dereferenced exactly once. | |
a.insert(p, il) | iterator | a.insert(p, il.begin(), il.end()). | |
a.erase(q) | iterator | ||
a.erase(q1,q2) | iterator | ||
a.clear() | void | ||
a.assign(i,j) | void | For vector, if the iterator does not
meet the forward iterator requirements ([forward.iterators]), T
is also
Cpp17MoveInsertable into X. Invalidates all references, pointers and iterators
referring to the elements of a. Each iterator in the range [i, j) shall be dereferenced exactly once. | |
a.assign(il) | void | a.assign(il.begin(), il.end()). | |
a.assign(n,t) | void | Invalidates all references, pointers and iterators
referring to the elements of a. |
Expression | Return type | Operational semantics | Container | |
a.front() | reference; const_reference for constant a | *a.begin() | basic_string,
array,
deque,
forward_list,
list,
vector | |
a.back() | reference; const_reference for constant a | { auto tmp = a.end(); --tmp; return *tmp; } | basic_string,
array,
deque,
list,
vector | |
a.emplace_front(args) | reference | deque,
forward_list,
list | ||
a.emplace_back(args) | reference | deque,
list,
vector | ||
a.push_front(t) | void | deque,
forward_list,
list | ||
a.push_front(rv) | void | deque,
forward_list,
list | ||
a.push_back(t) | void | basic_string,
deque,
list,
vector | ||
a.push_back(rv) | void | basic_string,
deque,
list,
vector | ||
a.pop_front() | void | deque,
forward_list,
list | ||
a.pop_back() | void | basic_string,
deque,
list,
vector | ||
a[n] | reference; const_reference for constant a | *(a.begin() + n) | basic_string,
array,
deque,
vector | |
a.at(n) | reference; const_reference for constant a | *(a.begin() + n) | basic_string,
array,
deque,
vector |
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> | |
unordered_map<K, T, H1, E1, A> | unordered_map<K, T, H2, E2, A> | |
unordered_map<K, T, H1, E1, A> | unordered_multimap<K, T, H2, E2, A> | |
unordered_set<K, H1, E1, A> | unordered_set<K, H2, E2, A> | |
unordered_set<K, H1, E1, A> | unordered_multiset<K, H2, E2, A> |
node-handle(node-handle&& nh) noexcept;
node-handle& operator=(node-handle&& nh);
~node-handle();
value_type& value() const;
key_type& key() const;
mapped_type& mapped() const;
allocator_type get_allocator() const;
explicit operator bool() const noexcept;
[[nodiscard]] bool empty() const noexcept;
void swap(node-handle& nh)
noexcept(ator_traits::propagate_on_container_swap::value ||
ator_traits::is_always_equal::value);
Expression | Return type | Assertion/note | Complexity | |
pre-/post-condition | ||||
Key | compile time | |||
T | compile time | |||
Key | Preconditions: value_type is Cpp17Erasable from X | compile time | ||
X::value_type (map and multimap only) | pair<const Key, T> | Preconditions: value_type is Cpp17Erasable from X | compile time | |
Compare | Preconditions: key_compare is Cpp17CopyConstructible. | compile time | ||
a binary predicate type | is the same as key_compare for set and
multiset; is an ordering relation on pairs induced by the
first component (i.e., Key) for map and multimap. | compile time | ||
A specialization of a node-handle
class template, such that the public nested types are
the same types as the corresponding types in X. | see [container.node] | compile time | ||
constant | ||||
X() X u; | constant | |||
X(i,j,c) X u(i,j,c); | in general, where N has the value distance(i, j);
linear if [i, j) is sorted with value_comp() | |||
X(i,j) X u(i,j); | same as above | |||
X(il) | same as X(il.begin(), il.end()) | same as X(il.begin(), il.end()) | ||
X(il,c) | same as X(il.begin(), il.end(), c) | same as X(il.begin(), il.end(), c) | ||
a = il | X& | in general, where N has the value il.size() + a.size();
linear if [il.begin(), il.end()) is sorted with value_comp() | ||
X::key_compare | Returns: the comparison object out of which b was constructed. | constant | ||
X::value_compare | Returns: an object of value_compare constructed out of the comparison object | constant | ||
pair<iterator, bool> | Effects: Inserts a value_type object 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 t. 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 t. | logarithmic | ||
a_eq.emplace(args) | iterator | logarithmic | ||
iterator | logarithmic in general, but amortized constant if the element
is inserted right before p | |||
pair<iterator, bool> | Preconditions: If t is a non-const rvalue, value_type is
Cpp17MoveInsertable into X; otherwise, value_type is
Cpp17CopyInsertable into X. Effects: Inserts t if and only if there is no element in the container with key equivalent to the key of t. 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 t. | logarithmic | ||
a_eq.insert(t) | iterator | logarithmic | ||
a.insert(p, t) | iterator | Preconditions: If t is a non-const rvalue, value_type is
Cpp17MoveInsertable into X; otherwise, value_type is
Cpp17CopyInsertable into X. Effects: Inserts t if and only if there is no element with key equivalent to the key of t in containers with unique keys; always inserts t in containers with equivalent keys. Always
returns the iterator pointing to the element with key equivalent to
the key of t. | ||
a.insert(i, j) | void | Effects: Inserts each element from the range [i, j) if and only if there is no element with key equivalent to the key of that element in containers with unique keys; always inserts that element in containers with equivalent keys. | , where N has the value distance(i, j) | |
a.insert(il) | void | Effects: Equivalent to a.insert(il.begin(), il.end()) | ||
a_uniq.insert(nh) | insert_return_type | 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(). Otherwise if the insertion took place, inserted is true,
position points to the inserted element, and node is empty;
if the insertion failed, inserted is false,
node has the previous value of nh, and position
points to an element with a key equivalent to nh.key(). | logarithmic | |
a_eq.insert(nh) | iterator | logarithmic | ||
a.insert(p, nh) | iterator | Otherwise, inserts the element owned by nh if and only if there
is no element with key equivalent to nh.key() in containers with
unique keys; always inserts the element owned by nh in containers
with equivalent keys. Always returns the iterator pointing to the element
with key equivalent to nh.key(). The element is inserted as close
as possible to the position just prior to p. | logarithmic in general, but amortized constant if the element is inserted right
before p. | |
node_type | ||||
a.extract(q) | node_type | amortized constant | ||
void | Preconditions: a.get_allocator() == a2.get_allocator(). Effects: Attempts to extract each element in a2 and insert it into a using the comparison object of a. In containers with unique keys,
if there is an element in a with key equivalent to the key of an
element from a2, then that element is not extracted from a2. Postconditions: Pointers and references to the transferred elements of a2 refer to those same elements but as members of a. Iterators referring
to the transferred elements will continue to refer to their elements, but
they now behave as iterators into a, not into a2. Throws: Nothing unless the comparison object throws. | |||
size_type | ||||
a.erase(q) | iterator | amortized constant | ||
a.erase(r) | iterator | amortized constant | ||
a.erase( q1, q2) | iterator | |||
void | linear in a.size(). | |||
Returns: An iterator pointing to an element with the key equivalent
to k, or b.end() if such an element is not found. | logarithmic | |||
a_tran. find(ke) | Returns: An iterator pointing to an element with key r such that
!c(r, ke) && !c(ke, r), or a_tran.end() if such an element
is not found. | logarithmic | ||
size_type | Returns: The number of elements with key equivalent to k. | |||
a_tran. count(ke) | size_type | Returns: The number of elements with key r such that
!c(r, ke) && !c(ke, r) | ||
bool | Effects: Equivalent to: return b.find(k) != b.end(); | logarithmic | ||
a_tran. contains(ke) | bool | Effects: Equivalent to: return a_tran.find(ke) != a_tran.end(); | logarithmic | |
Returns: An iterator pointing to the first element with
key not less than k,
or b.end() if such an element is not found. | logarithmic | |||
a_tran. lower_bound(kl) | Returns: An iterator pointing to the first element with
key r such that !c(r, kl),
or a_tran.end() if such an element is not found. | logarithmic | ||
Returns: An iterator pointing to the first element with
key greater than k,
or b.end() if such an element is not found. | logarithmic | |||
a_tran. upper_bound(ku) | Returns: An iterator pointing to the first element with
key r such that c(ku, r),
or a_tran.end() if such an element is not found. | logarithmic | ||
Effects: Equivalent to: return make_pair(b.lower_bound(k), b.upper_bound(k)); | logarithmic | |||
a_tran. equal_range(ke) | Effects: Equivalent to: return make_pair( a_tran.lower_bound(ke), a_tran.upper_bound(ke)); | logarithmic |
Expression | Return type | Assertion/note | Complexity | |
pre-/post-condition | ||||
Key | compile time | |||
T | compile time | |||
Key | Preconditions: value_type is Cpp17Erasable from X | compile time | ||
X::value_type (unordered_map and unordered_multimap only) | pair<const Key, T> | Preconditions: value_type is Cpp17Erasable from X | compile time | |
Hash | Preconditions: Hash is a unary function object type such that the expression
hf(k) has type size_t. | compile time | ||
Pred | compile time | |||
An iterator type whose category, value type,
difference type, and pointer and reference types are the same as
X::iterator's. | A local_iterator object may be used to iterate through a
single bucket, but may not be used to iterate across
buckets. | compile time | ||
An iterator type whose category, value type,
difference type, and pointer and reference types are the same as
X::const_iterator's. | A const_local_iterator object may be used to iterate through a
single bucket, but may not be used to iterate across
buckets. | compile time | ||
a specialization of a node-handle
class template, such that the public nested types are
the same types as the corresponding types in X. | see [container.node] | compile time | ||
X | Effects: Constructs an empty container with at least n buckets,
using hf as the hash function and eq as the key
equality predicate. | |||
X(n, hf) X a(n, hf); | X | |||
X(n) X a(n); | X | |||
X() X a; | X | constant | ||
X(i, j, n, hf, eq) X a(i, j, n, hf, eq); | X | Average case (N is distance(i, j)), worst case
| ||
X(i, j, n, hf) X a(i, j, n, hf); | X | Average case (N is distance(i, j)), worst case
| ||
X(i, j, n) X a(i, j, n); | X | Effects: Constructs an empty container with at least n buckets, using hasher() as the hash function and key_equal() as the key equality predicate, and inserts elements from [i, j) into it. | Average case (N is distance(i, j)), worst case
| |
X(i, j) X a(i, j); | X | Effects: Constructs an empty container with an unspecified number of buckets, using hasher() as the hash function and key_equal() as the key equality predicate, and inserts elements from [i, j) into it. | Average case (N is distance(i, j)), worst case
| |
X(il) | X | Same as X(il.begin(), il.end()). | ||
X(il, n) | X | Same as X(il.begin(), il.end(), n). | ||
X(il, n, hf) | X | Same as X(il.begin(), il.end(), n, hf). | ||
X(il, n, hf, eq) | X | Same as X(il.begin(), il.end(), n, hf, eq). | ||
X(b) X a(b); | X | Average case linear in b.size(), worst case quadratic. | ||
a = b | X& | Average case linear in b.size(), worst case quadratic. | ||
a = il | X& | Same as a = X(il). | ||
hasher | Returns: b's hash function. | constant | ||
key_equal | Returns: b's key equality predicate. | constant | ||
pair<iterator, bool> | Effects: Inserts a value_type object 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 t. 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 t. | |||
a_eq.emplace(args) | iterator | |||
iterator | ||||
pair<iterator, bool> | Preconditions: If t is a non-const rvalue, value_type is
Cpp17MoveInsertable into X; otherwise, value_type is
Cpp17CopyInsertable into X. Effects: Inserts t if and only if there is no element in the container with key equivalent to the key of t. The bool
component of the returned pair indicates whether the insertion
takes place, and the iterator component points to the element
with key equivalent to the key of t. | |||
a_eq.insert(t) | iterator | |||
a.insert(p, t) | iterator | Preconditions: If t is a non-const rvalue, value_type is
Cpp17MoveInsertable into X; otherwise, value_type is
Cpp17CopyInsertable into X. Return value is an iterator pointing
to the element with the key equivalent to that of t. The
iterator p is a hint pointing to where the search should
start. Implementations are permitted to ignore the hint. | ||
a.insert(i, j) | void | |||
a.insert(il) | void | Same as a.insert(il.begin(), il.end()). | ||
a_uniq. insert(nh) | insert_return_type | 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(). Otherwise if the insertion took place, inserted is true,
position points to the inserted element, and node is empty;
if the insertion failed, inserted is false,
node has the previous value of nh, and position
points to an element with a key equivalent to nh.key(). | ||
a_eq. insert(nh) | iterator | |||
a.insert(q, nh) | iterator | Otherwise, inserts the element owned by nh if and only if there
is no element with key equivalent to nh.key() in containers with
unique keys; always inserts the element owned by nh in containers
with equivalent keys. Always returns the iterator pointing to the element
with key equivalent to nh.key(). The iterator q is a hint
pointing to where the search should start. Implementations are permitted
to ignore the hint. | ||
node_type | ||||
a.extract(q) | node_type | |||
void | Preconditions: a.get_allocator() == a2.get_allocator(). Attempts to extract each element in a2 and insert it into a using the hash function and key equality predicate of a. In containers with unique keys, if there is an element in a with
key equivalent to the key of an element from a2, then that
element is not extracted from a2. Postconditions: Pointers and references to the transferred elements of a2
refer to those same elements but as members of a. Iterators referring
to the transferred elements and all iterators referring to a will
be invalidated, but iterators to elements remaining in a2 will
remain valid. | |||
size_type | ||||
a.erase(q) | iterator | |||
a.erase(r) | iterator | |||
a.erase(q1, q2) | iterator | |||
void | Effects: Erases all elements in the container. Postconditions: a.empty() is true | Linear in a.size(). | ||
Returns: An iterator pointing to an element with key equivalent to
k, or b.end() if no such element exists. | ||||
a_tran.find(ke) | Returns: An iterator pointing to an element with key equivalent to
ke, or a_tran.end() if no such element exists. | |||
size_type | Returns: The number of elements with key equivalent to k. | |||
a_tran.count(ke) | size_type | Returns: The number of elements with key equivalent to ke. | ||
bool | Effects: Equivalent to b.find(k) != b.end() | |||
a_tran.contains(ke) | bool | Effects: Equivalent to a_tran.find(ke) != a_tran.end() | ||
a_tran.equal_range(ke) | ||||
size_type | Returns: The number of buckets that b contains. | Constant | ||
size_type | Returns: An upper bound on the number of buckets that b can
ever contain. | Constant | ||
size_type | Constant | |||
size_type | ||||
Constant | ||||
Constant | ||||
const_local_iterator | Constant | |||
const_local_iterator | Constant | |||
float | Returns: The average number of elements per bucket. | Constant | ||
float | Constant | |||
a.max_load_factor(z) | void | Constant | ||
void | Average case linear in a.size(), worst case quadratic. | |||
void | Average case linear in a.size(), worst case quadratic. |
template<class T, class... U>
array(T, U...) -> array<T, 1 + sizeof...(U)>;
constexpr size_type size() const noexcept;
constexpr T* data() noexcept;
constexpr const T* data() const noexcept;
constexpr void fill(const T& u);
constexpr void swap(array& y) noexcept(is_nothrow_swappable_v<T>);
template<class T, size_t N>
constexpr void swap(array<T, N>& x, array<T, N>& y) noexcept(noexcept(x.swap(y)));
template<class T, size_t N>
constexpr array<remove_cv_t<T>, N> to_array(T (&a)[N]);
template<class T, size_t N>
constexpr array<remove_cv_t<T>, N> to_array(T (&&a)[N]);
template<class T, size_t N>
struct tuple_size<array<T, N>> : integral_constant<size_t, N> { };
template<size_t I, class T, size_t N>
struct tuple_element<I, array<T, N>> {
using type = T;
};
template<size_t I, class T, size_t N>
constexpr T& get(array<T, N>& a) noexcept;
template<size_t I, class T, size_t N>
constexpr T&& get(array<T, N>&& a) noexcept;
template<size_t I, class T, size_t N>
constexpr const T& get(const array<T, N>& a) noexcept;
template<size_t I, class T, size_t N>
constexpr const T&& get(const array<T, N>&& a) noexcept;
explicit deque(const Allocator&);
explicit deque(size_type n, const Allocator& = Allocator());
deque(size_type n, const T& value, const Allocator& = Allocator());
template<class InputIterator>
deque(InputIterator first, InputIterator last, const Allocator& = Allocator());
void resize(size_type sz);
void resize(size_type sz, const T& c);
void shrink_to_fit();
iterator insert(const_iterator position, const T& x);
iterator insert(const_iterator position, T&& x);
iterator insert(const_iterator position, size_type n, const T& x);
template<class InputIterator>
iterator insert(const_iterator position,
InputIterator first, InputIterator last);
iterator insert(const_iterator position, initializer_list<T>);
template<class... Args> reference emplace_front(Args&&... args);
template<class... Args> reference emplace_back(Args&&... args);
template<class... Args> iterator emplace(const_iterator position, Args&&... args);
void push_front(const T& x);
void push_front(T&& x);
void push_back(const T& x);
void push_back(T&& x);
iterator erase(const_iterator position);
iterator erase(const_iterator first, const_iterator last);
void pop_front();
void pop_back();
template<class T, class Allocator, class U>
typename deque<T, Allocator>::size_type
erase(deque<T, Allocator>& c, const U& value);
template<class T, class Allocator, class Predicate>
typename deque<T, Allocator>::size_type
erase_if(deque<T, Allocator>& c, Predicate pred);
explicit forward_list(const Allocator&);
explicit forward_list(size_type n, const Allocator& = Allocator());
forward_list(size_type n, const T& value, const Allocator& = Allocator());
template<class InputIterator>
forward_list(InputIterator first, InputIterator last, const Allocator& = Allocator());
iterator before_begin() noexcept;
const_iterator before_begin() const noexcept;
const_iterator cbefore_begin() const noexcept;
reference front();
const_reference front() const;
template<class... Args> reference emplace_front(Args&&... args);
void push_front(const T& x);
void push_front(T&& x);
void pop_front();
iterator insert_after(const_iterator position, const T& x);
iterator insert_after(const_iterator position, T&& x);
iterator insert_after(const_iterator position, size_type n, const T& x);
template<class InputIterator>
iterator insert_after(const_iterator position, InputIterator first, InputIterator last);
iterator insert_after(const_iterator position, initializer_list<T> il);
template<class... Args>
iterator emplace_after(const_iterator position, Args&&... args);
iterator erase_after(const_iterator position);
iterator erase_after(const_iterator position, const_iterator last);
void resize(size_type sz);
void resize(size_type sz, const value_type& c);
void clear() noexcept;
void splice_after(const_iterator position, forward_list& x);
void splice_after(const_iterator position, forward_list&& x);
void splice_after(const_iterator position, forward_list& x, const_iterator i);
void splice_after(const_iterator position, forward_list&& x, const_iterator i);
void splice_after(const_iterator position, forward_list& x,
const_iterator first, const_iterator last);
void splice_after(const_iterator position, forward_list&& x,
const_iterator first, const_iterator last);
size_type remove(const T& value);
template<class Predicate> size_type remove_if(Predicate pred);
size_type unique();
template<class BinaryPredicate> size_type unique(BinaryPredicate pred);
void merge(forward_list& x);
void merge(forward_list&& x);
template<class Compare> void merge(forward_list& x, Compare comp);
template<class Compare> void merge(forward_list&& x, Compare comp);
void sort();
template<class Compare> void sort(Compare comp);
void reverse() noexcept;
template<class T, class Allocator, class U>
typename forward_list<T, Allocator>::size_type
erase(forward_list<T, Allocator>& c, const U& value);
template<class T, class Allocator, class Predicate>
typename forward_list<T, Allocator>::size_type
erase_if(forward_list<T, Allocator>& c, Predicate pred);
explicit list(const Allocator&);
explicit list(size_type n, const Allocator& = Allocator());
list(size_type n, const T& value, const Allocator& = Allocator());
template<class InputIterator>
list(InputIterator first, InputIterator last, const Allocator& = Allocator());
iterator insert(const_iterator position, const T& x);
iterator insert(const_iterator position, T&& x);
iterator insert(const_iterator position, size_type n, const T& x);
template<class InputIterator>
iterator insert(const_iterator position, InputIterator first,
InputIterator last);
iterator insert(const_iterator position, initializer_list<T>);
template<class... Args> reference emplace_front(Args&&... args);
template<class... Args> reference emplace_back(Args&&... args);
template<class... Args> iterator emplace(const_iterator position, Args&&... args);
void push_front(const T& x);
void push_front(T&& x);
void push_back(const T& x);
void push_back(T&& x);
iterator erase(const_iterator position);
iterator erase(const_iterator first, const_iterator last);
void pop_front();
void pop_back();
void clear() noexcept;
void splice(const_iterator position, list& x);
void splice(const_iterator position, list&& x);
void splice(const_iterator position, list& x, const_iterator i);
void splice(const_iterator position, list&& x, const_iterator i);
void splice(const_iterator position, list& x, const_iterator first,
const_iterator last);
void splice(const_iterator position, list&& x, const_iterator first,
const_iterator last);
size_type remove(const T& value);
template<class Predicate> size_type remove_if(Predicate pred);
size_type unique();
template<class BinaryPredicate> size_type unique(BinaryPredicate binary_pred);
void merge(list& x);
void merge(list&& x);
template<class Compare> void merge(list& x, Compare comp);
template<class Compare> void merge(list&& x, Compare comp);
void reverse() noexcept;
void sort();
template<class Compare> void sort(Compare comp);
template<class T, class Allocator, class U>
typename list<T, Allocator>::size_type
erase(list<T, Allocator>& c, const U& value);
template<class T, class Allocator, class Predicate>
typename list<T, Allocator>::size_type
erase_if(list<T, Allocator>& c, Predicate pred);
constexpr explicit vector(const Allocator&) noexcept;
constexpr explicit vector(size_type n, const Allocator& = Allocator());
constexpr vector(size_type n, const T& value,
const Allocator& = Allocator());
template<class InputIterator>
constexpr vector(InputIterator first, InputIterator last,
const Allocator& = Allocator());
constexpr size_type capacity() const noexcept;
constexpr void reserve(size_type n);
constexpr void shrink_to_fit();
constexpr void swap(vector& x)
noexcept(allocator_traits<Allocator>::propagate_on_container_swap::value ||
allocator_traits<Allocator>::is_always_equal::value);
constexpr void resize(size_type sz);
constexpr void resize(size_type sz, const T& c);
constexpr iterator insert(const_iterator position, const T& x);
constexpr iterator insert(const_iterator position, T&& x);
constexpr iterator insert(const_iterator position, size_type n, const T& x);
template<class InputIterator>
constexpr iterator insert(const_iterator position, InputIterator first, InputIterator last);
constexpr iterator insert(const_iterator position, initializer_list<T>);
template<class... Args> constexpr reference emplace_back(Args&&... args);
template<class... Args> constexpr iterator emplace(const_iterator position, Args&&... args);
constexpr void push_back(const T& x);
constexpr void push_back(T&& x);
constexpr iterator erase(const_iterator position);
constexpr iterator erase(const_iterator first, const_iterator last);
constexpr void pop_back();
template<class T, class Allocator, class U>
constexpr typename vector<T, Allocator>::size_type
erase(vector<T, Allocator>& c, const U& value);
template<class T, class Allocator, class Predicate>
constexpr typename vector<T, Allocator>::size_type
erase_if(vector<T, Allocator>& c, Predicate pred);
constexpr void flip() noexcept;
constexpr static void swap(reference x, reference y) noexcept;
template<class Allocator> struct hash<vector<bool, Allocator>>;
explicit map(const Compare& comp, const Allocator& = Allocator());
template<class InputIterator>
map(InputIterator first, InputIterator last,
const Compare& comp = Compare(), const Allocator& = Allocator());
mapped_type& operator[](const key_type& x);
mapped_type& operator[](key_type&& x);
mapped_type& at(const key_type& x);
const mapped_type& at(const key_type& x) const;
template<class P>
pair<iterator, bool> insert(P&& x);
template<class P>
iterator insert(const_iterator position, P&& x);
template<class... Args>
pair<iterator, bool> try_emplace(const key_type& k, Args&&... args);
template<class... Args>
iterator try_emplace(const_iterator hint, const key_type& k, Args&&... args);
template<class... Args>
pair<iterator, bool> try_emplace(key_type&& k, Args&&... args);
template<class... Args>
iterator try_emplace(const_iterator hint, key_type&& k, Args&&... args);
template<class M>
pair<iterator, bool> insert_or_assign(const key_type& k, M&& obj);
template<class M>
iterator insert_or_assign(const_iterator hint, const key_type& k, M&& obj);
template<class M>
pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);
template<class M>
iterator insert_or_assign(const_iterator hint, key_type&& k, M&& obj);
template<class Key, class T, class Compare, class Allocator, class Predicate>
typename map<Key, T, Compare, Allocator>::size_type
erase_if(map<Key, T, Compare, Allocator>& c, Predicate pred);
explicit multimap(const Compare& comp, const Allocator& = Allocator());
template<class InputIterator>
multimap(InputIterator first, InputIterator last,
const Compare& comp = Compare(),
const Allocator& = Allocator());
template<class P> iterator insert(P&& x);
template<class P> iterator insert(const_iterator position, P&& x);
template<class Key, class T, class Compare, class Allocator, class Predicate>
typename multimap<Key, T, Compare, Allocator>::size_type
erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred);
explicit set(const Compare& comp, const Allocator& = Allocator());
template<class InputIterator>
set(InputIterator first, InputIterator last,
const Compare& comp = Compare(), const Allocator& = Allocator());
template<class Key, class Compare, class Allocator, class Predicate>
typename set<Key, Compare, Allocator>::size_type
erase_if(set<Key, Compare, Allocator>& c, Predicate pred);
explicit multiset(const Compare& comp, const Allocator& = Allocator());
template<class InputIterator>
multiset(InputIterator first, InputIterator last,
const Compare& comp = Compare(), const Allocator& = Allocator());
template<class Key, class Compare, class Allocator, class Predicate>
typename multiset<Key, Compare, Allocator>::size_type
erase_if(multiset<Key, Compare, Allocator>& c, Predicate pred);
unordered_map() : unordered_map(size_type(see below)) { }
explicit unordered_map(size_type n,
const hasher& hf = hasher(),
const key_equal& eql = key_equal(),
const allocator_type& a = allocator_type());
template<class InputIterator>
unordered_map(InputIterator f, InputIterator l,
size_type n = see below,
const hasher& hf = hasher(),
const key_equal& eql = key_equal(),
const allocator_type& a = allocator_type());
unordered_map(initializer_list<value_type> il,
size_type n = see below,
const hasher& hf = hasher(),
const key_equal& eql = key_equal(),
const allocator_type& a = allocator_type());
mapped_type& operator[](const key_type& k);
mapped_type& operator[](key_type&& k);
mapped_type& at(const key_type& k);
const mapped_type& at(const key_type& k) const;
template<class P>
pair<iterator, bool> insert(P&& obj);
template<class P>
iterator insert(const_iterator hint, P&& obj);
template<class... Args>
pair<iterator, bool> try_emplace(const key_type& k, Args&&... args);
template<class... Args>
iterator try_emplace(const_iterator hint, const key_type& k, Args&&... args);
template<class... Args>
pair<iterator, bool> try_emplace(key_type&& k, Args&&... args);
template<class... Args>
iterator try_emplace(const_iterator hint, key_type&& k, Args&&... args);
template<class M>
pair<iterator, bool> insert_or_assign(const key_type& k, M&& obj);
template<class M>
iterator insert_or_assign(const_iterator hint, const key_type& k, M&& obj);
template<class M>
pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);
template<class M>
iterator insert_or_assign(const_iterator hint, key_type&& k, M&& obj);
template<class K, class T, class H, class P, class A, class Predicate>
typename unordered_map<K, T, H, P, A>::size_type
erase_if(unordered_map<K, T, H, P, A>& c, Predicate pred);
unordered_multimap() : unordered_multimap(size_type(see below)) { }
explicit unordered_multimap(size_type n,
const hasher& hf = hasher(),
const key_equal& eql = key_equal(),
const allocator_type& a = allocator_type());
template<class InputIterator>
unordered_multimap(InputIterator f, InputIterator l,
size_type n = see below,
const hasher& hf = hasher(),
const key_equal& eql = key_equal(),
const allocator_type& a = allocator_type());
unordered_multimap(initializer_list<value_type> il,
size_type n = see below,
const hasher& hf = hasher(),
const key_equal& eql = key_equal(),
const allocator_type& a = allocator_type());
template<class P>
iterator insert(P&& obj);
template<class P>
iterator insert(const_iterator hint, P&& obj);
template<class K, class T, class H, class P, class A, class Predicate>
typename unordered_multimap<K, T, H, P, A>::size_type
erase_if(unordered_multimap<K, T, H, P, A>& c, Predicate pred);
unordered_set() : unordered_set(size_type(see below)) { }
explicit unordered_set(size_type n,
const hasher& hf = hasher(),
const key_equal& eql = key_equal(),
const allocator_type& a = allocator_type());
template<class InputIterator>
unordered_set(InputIterator f, InputIterator l,
size_type n = see below,
const hasher& hf = hasher(),
const key_equal& eql = key_equal(),
const allocator_type& a = allocator_type());
unordered_set(initializer_list<value_type> il,
size_type n = see below,
const hasher& hf = hasher(),
const key_equal& eql = key_equal(),
const allocator_type& a = allocator_type());
template<class K, class H, class P, class A, class Predicate>
typename unordered_set<K, H, P, A>::size_type
erase_if(unordered_set<K, H, P, A>& c, Predicate pred);
unordered_multiset() : unordered_multiset(size_type(see below)) { }
explicit unordered_multiset(size_type n,
const hasher& hf = hasher(),
const key_equal& eql = key_equal(),
const allocator_type& a = allocator_type());
template<class InputIterator>
unordered_multiset(InputIterator f, InputIterator l,
size_type n = see below,
const hasher& hf = hasher(),
const key_equal& eql = key_equal(),
const allocator_type& a = allocator_type());
unordered_multiset(initializer_list<value_type> il,
size_type n = see below,
const hasher& hf = hasher(),
const key_equal& eql = key_equal(),
const allocator_type& a = allocator_type());
template<class K, class H, class P, class A, class Predicate>
typename unordered_multiset<K, H, P, A>::size_type
erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
explicit queue(const Container& cont);
explicit queue(Container&& cont);
template<class Alloc> explicit queue(const Alloc& a);
template<class Alloc> queue(const container_type& cont, const Alloc& a);
template<class Alloc> queue(container_type&& cont, const Alloc& a);
template<class Alloc> queue(const queue& q, const Alloc& a);
template<class Alloc> queue(queue&& q, const Alloc& a);
template<class T, class Container>
bool operator==(const queue<T, Container>& x, const queue<T, Container>& y);
template<class T, class Container>
bool operator!=(const queue<T, Container>& x, const queue<T, Container>& y);
template<class T, class Container>
bool operator< (const queue<T, Container>& x, const queue<T, Container>& y);
template<class T, class Container>
bool operator> (const queue<T, Container>& x, const queue<T, Container>& y);
template<class T, class Container>
bool operator<=(const queue<T, Container>& x, const queue<T, Container>& y);
template<class T, class Container>
bool operator>=(const queue<T, Container>& x,
const queue<T, Container>& y);
template<class T, three_way_comparable Container>
compare_three_way_result_t<Container>
operator<=>(const queue<T, Container>& x, const queue<T, Container>& y);
priority_queue(const Compare& x, const Container& y);
priority_queue(const Compare& x, Container&& y);
template<class InputIterator>
priority_queue(InputIterator first, InputIterator last, const Compare& x, const Container& y);
template<class InputIterator>
priority_queue(InputIterator first, InputIterator last, const Compare& x = Compare(),
Container&& y = Container());
template<class Alloc> explicit priority_queue(const Alloc& a);
template<class Alloc> priority_queue(const Compare& compare, const Alloc& a);
template<class Alloc>
priority_queue(const Compare& compare, const Container& cont, const Alloc& a);
template<class Alloc>
priority_queue(const Compare& compare, Container&& cont, const Alloc& a);
template<class Alloc> priority_queue(const priority_queue& q, const Alloc& a);
template<class Alloc> priority_queue(priority_queue&& q, const Alloc& a);
void push(const value_type& x);
void push(value_type&& x);
template<class... Args> void emplace(Args&&... args);
void pop();
template<class T, class Container, class Compare>
void swap(priority_queue<T, Container, Compare>& x,
priority_queue<T, Container, Compare>& y) noexcept(noexcept(x.swap(y)));
explicit stack(const Container& cont);
explicit stack(Container&& cont);
template<class Alloc> explicit stack(const Alloc& a);
template<class Alloc> stack(const container_type& cont, const Alloc& a);
template<class Alloc> stack(container_type&& cont, const Alloc& a);
template<class Alloc> stack(const stack& s, const Alloc& a);
template<class Alloc> stack(stack&& s, const Alloc& a);
template<class T, class Container>
bool operator==(const stack<T, Container>& x, const stack<T, Container>& y);
template<class T, class Container>
bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
template<class T, class Container>
bool operator< (const stack<T, Container>& x, const stack<T, Container>& y);
template<class T, class Container>
bool operator> (const stack<T, Container>& x, const stack<T, Container>& y);
template<class T, class Container>
bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
template<class T, class Container>
bool operator>=(const stack<T, Container>& x, const stack<T, Container>& y);
template<class T, three_way_comparable Container>
compare_three_way_result_t<Container>
operator<=>(const stack<T, Container>& x, const stack<T, Container>& y);
constexpr span() noexcept;
template<class It>
constexpr explicit(extent != dynamic_extent) span(It first, size_type count);
template<class It, class End>
constexpr explicit(extent != dynamic_extent) span(It first, End last);
template<size_t N> constexpr span(type_identity_t<element_type> (&arr)[N]) noexcept;
template<class T, size_t N> constexpr span(array<T, N>& arr) noexcept;
template<class T, size_t N> constexpr span(const array<T, N>& arr) noexcept;
template<class R> constexpr explicit(extent != dynamic_extent) span(R&& r);
constexpr span(const span& other) noexcept = default;
template<class OtherElementType, size_t OtherExtent>
constexpr explicit(see below) span(const span<OtherElementType, OtherExtent>& s) noexcept;
constexpr span& operator=(const span& other) noexcept = default;
template<class It, class EndOrSize>
span(It, EndOrSize) -> span<remove_reference_t<iter_reference_t<It>>>;
template<class R>
span(R&&) -> span<remove_reference_t<ranges::range_reference_t<R>>>;
template<size_t Count> constexpr span<element_type, Count> first() const;
template<size_t Count> constexpr span<element_type, Count> last() const;
template<size_t Offset, size_t Count = dynamic_extent>
constexpr span<element_type, see below> subspan() const;
constexpr span<element_type, dynamic_extent> first(size_type count) const;
constexpr span<element_type, dynamic_extent> last(size_type count) const;
constexpr span<element_type, dynamic_extent> subspan(
size_type offset, size_type count = dynamic_extent) const;
constexpr size_type size() const noexcept;
constexpr size_type size_bytes() const noexcept;
[[nodiscard]] constexpr bool empty() const noexcept;
constexpr reference operator[](size_type idx) const;
constexpr reference front() const;
constexpr reference back() const;
constexpr pointer data() const noexcept;
constexpr iterator begin() const noexcept;
constexpr iterator end() const noexcept;
constexpr reverse_iterator rbegin() const noexcept;
constexpr reverse_iterator rend() const noexcept;
template<class ElementType, size_t Extent>
span<const byte, Extent == dynamic_extent ? dynamic_extent : sizeof(ElementType) * Extent>
as_bytes(span<ElementType, Extent> s) noexcept;
template<class ElementType, size_t Extent>
span<byte, Extent == dynamic_extent ? dynamic_extent : sizeof(ElementType) * Extent>
as_writable_bytes(span<ElementType, Extent> s) noexcept;