Subclause | Header | ||
Utility components | <utility> | ||
Compile-time integer sequences | |||
Pairs | |||
Tuples | <tuple> | ||
Optional objects | <optional> | ||
Variants | <variant> | ||
Storage for any type | <any> | ||
Fixed-size sequences of bits | <bitset> | ||
Memory | <cstdlib>, <memory> | ||
Smart pointers | <memory> | ||
Memory resources | <memory_resource> | ||
Scoped allocators | <scoped_allocator> | ||
Function objects | <functional> | ||
Type traits | <type_traits> | ||
Compile-time rational arithmetic | <ratio> | ||
Type indexes | <typeindex> | ||
Execution policies | <execution> | ||
Primitive numeric conversions | <charconv> | ||
Formatting | <format> |
template<class T>
constexpr void swap(T& a, T& b) noexcept(see below);
template<class T, size_t N>
constexpr void swap(T (&a)[N], T (&b)[N]) noexcept(is_nothrow_swappable_v<T>);
template<class T, class U = T>
constexpr T exchange(T& obj, U&& new_val);
template<class T> constexpr T&& forward(remove_reference_t<T>& t) noexcept;
template<class T> constexpr T&& forward(remove_reference_t<T>&& t) noexcept;
template<class T> constexpr remove_reference_t<T>&& move(T&& t) noexcept;
template<class T> constexpr conditional_t<
!is_nothrow_move_constructible_v<T> && is_copy_constructible_v<T>, const T&, T&&>
move_if_noexcept(T& x) noexcept;
template<class T> constexpr add_const_t<T>& as_const(T& t) noexcept;
template<class T> add_rvalue_reference_t<T> declval() noexcept; // as unevaluated operand
template<class T, class U>
constexpr bool cmp_equal(T t, U u) noexcept;
template<class T, class U>
constexpr bool cmp_not_equal(T t, U u) noexcept;
template<class T, class U>
constexpr bool cmp_less(T t, U u) noexcept;
template<class T, class U>
constexpr bool cmp_greater(T t, U u) noexcept;
template<class T, class U>
constexpr bool cmp_less_equal(T t, U u) noexcept;
template<class T, class U>
constexpr bool cmp_greater_equal(T t, U u) noexcept;
template<class R, class T>
constexpr bool in_range(T t) noexcept;
template<class T, T N>
using make_integer_sequence = integer_sequence<T, see below>;
constexpr explicit(see below) pair();
constexpr explicit(see below) pair(const T1& x, const T2& y);
template<class U1, class U2> constexpr explicit(see below) pair(U1&& x, U2&& y);
template<class U1, class U2> constexpr explicit(see below) pair(const pair<U1, U2>& p);
template<class U1, class U2> constexpr explicit(see below) pair(pair<U1, U2>&& p);
template<class... Args1, class... Args2>
constexpr pair(piecewise_construct_t,
tuple<Args1...> first_args, tuple<Args2...> second_args);
constexpr pair& operator=(const pair& p);
template<class U1, class U2> constexpr pair& operator=(const pair<U1, U2>& p);
constexpr pair& operator=(pair&& p) noexcept(see below);
template<class U1, class U2> constexpr pair& operator=(pair<U1, U2>&& p);
constexpr void swap(pair& p) noexcept(see below);
template<class T1, class T2>
constexpr bool operator==(const pair<T1, T2>& x, const pair<T1, T2>& y);
template<class T1, class T2>
constexpr common_comparison_category_t<synth-three-way-result<T1>,
synth-three-way-result<T2>>
operator<=>(const pair<T1, T2>& x, const pair<T1, T2>& y);
template<class T1, class T2>
constexpr void swap(pair<T1, T2>& x, pair<T1, T2>& y) noexcept(noexcept(x.swap(y)));
template<class T1, class T2>
constexpr pair<unwrap_ref_decay_t<T1>, unwrap_ref_decay_t<T2>> make_pair(T1&& x, T2&& y);
template<class T1, class T2>
struct tuple_size<pair<T1, T2>> : integral_constant<size_t, 2> { };
template<size_t I, class T1, class T2>
struct tuple_element<I, pair<T1, T2>> {
using type = see below ;
};
template<size_t I, class T1, class T2>
constexpr tuple_element_t<I, pair<T1, T2>>& get(pair<T1, T2>& p) noexcept;
template<size_t I, class T1, class T2>
constexpr const tuple_element_t<I, pair<T1, T2>>& get(const pair<T1, T2>& p) noexcept;
template<size_t I, class T1, class T2>
constexpr tuple_element_t<I, pair<T1, T2>>&& get(pair<T1, T2>&& p) noexcept;
template<size_t I, class T1, class T2>
constexpr const tuple_element_t<I, pair<T1, T2>>&& get(const pair<T1, T2>&& p) noexcept;
template<class T1, class T2>
constexpr T1& get(pair<T1, T2>& p) noexcept;
template<class T1, class T2>
constexpr const T1& get(const pair<T1, T2>& p) noexcept;
template<class T1, class T2>
constexpr T1&& get(pair<T1, T2>&& p) noexcept;
template<class T1, class T2>
constexpr const T1&& get(const pair<T1, T2>&& p) noexcept;
template<class T2, class T1>
constexpr T2& get(pair<T1, T2>& p) noexcept;
template<class T2, class T1>
constexpr const T2& get(const pair<T1, T2>& p) noexcept;
template<class T2, class T1>
constexpr T2&& get(pair<T1, T2>&& p) noexcept;
template<class T2, class T1>
constexpr const T2&& get(const pair<T1, T2>&& p) noexcept;
struct piecewise_construct_t {
explicit piecewise_construct_t() = default;
};
inline constexpr piecewise_construct_t piecewise_construct{};
constexpr explicit(see below) tuple();
constexpr explicit(see below) tuple(const Types&...);
template<class... UTypes> constexpr explicit(see below) tuple(UTypes&&... u);
tuple(const tuple& u) = default;
tuple(tuple&& u) = default;
template<class... UTypes> constexpr explicit(see below) tuple(const tuple<UTypes...>& u);
template<class... UTypes> constexpr explicit(see below) tuple(tuple<UTypes...>&& u);
template<class U1, class U2> constexpr explicit(see below) tuple(const pair<U1, U2>& u);
template<class U1, class U2> constexpr explicit(see below) tuple(pair<U1, U2>&& u);
template<class Alloc>
constexpr explicit(see below)
tuple(allocator_arg_t, const Alloc& a);
template<class Alloc>
constexpr explicit(see below)
tuple(allocator_arg_t, const Alloc& a, const Types&...);
template<class Alloc, class... UTypes>
constexpr explicit(see below)
tuple(allocator_arg_t, const Alloc& a, UTypes&&...);
template<class Alloc>
constexpr tuple(allocator_arg_t, const Alloc& a, const tuple&);
template<class Alloc>
constexpr tuple(allocator_arg_t, const Alloc& a, tuple&&);
template<class Alloc, class... UTypes>
constexpr explicit(see below)
tuple(allocator_arg_t, const Alloc& a, const tuple<UTypes...>&);
template<class Alloc, class... UTypes>
constexpr explicit(see below)
tuple(allocator_arg_t, const Alloc& a, tuple<UTypes...>&&);
template<class Alloc, class U1, class U2>
constexpr explicit(see below)
tuple(allocator_arg_t, const Alloc& a, const pair<U1, U2>&);
template<class Alloc, class U1, class U2>
constexpr explicit(see below)
tuple(allocator_arg_t, const Alloc& a, pair<U1, U2>&&);
constexpr tuple& operator=(const tuple& u);
constexpr tuple& operator=(tuple&& u) noexcept(see below);
template<class... UTypes> constexpr tuple& operator=(const tuple<UTypes...>& u);
template<class... UTypes> constexpr tuple& operator=(tuple<UTypes...>&& u);
template<class U1, class U2> constexpr tuple& operator=(const pair<U1, U2>& u);
template<class U1, class U2> constexpr tuple& operator=(pair<U1, U2>&& u);
constexpr void swap(tuple& rhs) noexcept(see below);
template<class... TTypes>
constexpr tuple<unwrap_ref_decay_t<TTypes>...> make_tuple(TTypes&&... t);
template<class... TTypes>
constexpr tuple<TTypes&&...> forward_as_tuple(TTypes&&... t) noexcept;
template<class... TTypes>
constexpr tuple<TTypes&...> tie(TTypes&... t) noexcept;
template<class... Tuples>
constexpr tuple<CTypes...> tuple_cat(Tuples&&... tpls);
template<class F, class Tuple>
constexpr decltype(auto) apply(F&& f, Tuple&& t);
template<class T, class Tuple>
constexpr T make_from_tuple(Tuple&& t);
template<class T> struct tuple_size;
template<class... Types>
struct tuple_size<tuple<Types...>> : public integral_constant<size_t, sizeof...(Types)> { };
template<size_t I, class... Types>
struct tuple_element<I, tuple<Types...>> {
using type = TI;
};
template<class T> struct tuple_size<const T>;
template<size_t I, class T> struct tuple_element<I, const T>;
template<size_t I, class... Types>
constexpr tuple_element_t<I, tuple<Types...>>&
get(tuple<Types...>& t) noexcept;
template<size_t I, class... Types>
constexpr tuple_element_t<I, tuple<Types...>>&&
get(tuple<Types...>&& t) noexcept; // Note A
template<size_t I, class... Types>
constexpr const tuple_element_t<I, tuple<Types...>>&
get(const tuple<Types...>& t) noexcept; // Note B
template<size_t I, class... Types>
constexpr const tuple_element_t<I, tuple<Types...>>&& get(const tuple<Types...>&& t) noexcept;
template<class T, class... Types>
constexpr T& get(tuple<Types...>& t) noexcept;
template<class T, class... Types>
constexpr T&& get(tuple<Types...>&& t) noexcept;
template<class T, class... Types>
constexpr const T& get(const tuple<Types...>& t) noexcept;
template<class T, class... Types>
constexpr const T&& get(const tuple<Types...>&& t) noexcept;
template<class... TTypes, class... UTypes>
constexpr bool operator==(const tuple<TTypes...>& t, const tuple<UTypes...>& u);
template<class... TTypes, class... UTypes>
constexpr common_comparison_category_t<synth-three-way-result<TTypes, UTypes>...>
operator<=>(const tuple<TTypes...>& t, const tuple<UTypes...>& u);
template<class... Types, class Alloc>
struct uses_allocator<tuple<Types...>, Alloc> : true_type { };
template<class... Types>
constexpr void swap(tuple<Types...>& x, tuple<Types...>& y) noexcept(see below);
constexpr optional() noexcept;
constexpr optional(nullopt_t) noexcept;
constexpr optional(const optional& rhs);
constexpr optional(optional&& rhs) noexcept(see below);
template<class... Args> constexpr explicit optional(in_place_t, Args&&... args);
template<class U, class... Args>
constexpr explicit optional(in_place_t, initializer_list<U> il, Args&&... args);
template<class U = T> constexpr explicit(see below) optional(U&& v);
template<class U> explicit(see below) optional(const optional<U>& rhs);
template<class U> explicit(see below) optional(optional<U>&& rhs);
~optional();
optional<T>& operator=(nullopt_t) noexcept;
constexpr optional<T>& operator=(const optional& rhs);
*this contains a value | *this does not contain a value | |||
rhs contains a value | assigns *rhs to the contained value | initializes the contained value as if direct-non-list-initializing an object of type T with *rhs | ||
rhs does not contain a value | destroys the contained value by calling val->T::~T() | no effect |
constexpr optional& operator=(optional&& rhs) noexcept(see below);
*this contains a value | *this does not contain a value | |||
rhs contains a value | assigns std::move(*rhs) to the contained value | initializes the contained value as if direct-non-list-initializing an object of type T with std::move(*rhs) | ||
rhs does not contain a value | destroys the contained value by calling val->T::~T() | no effect |
template<class U = T> optional<T>& operator=(U&& v);
template<class U> optional<T>& operator=(const optional<U>& rhs);
*this contains a value | *this does not contain a value | |||
rhs contains a value | assigns *rhs to the contained value | initializes the contained value as if direct-non-list-initializing
an object of type T with *rhs | ||
rhs does not contain a value | destroys the contained value by calling val->T::~T() | no effect |
template<class U> optional<T>& operator=(optional<U>&& rhs);
*this contains a value | *this does not contain a value | |||
rhs contains a value | assigns std::move(*rhs) to the contained value | initializes the contained value as if direct-non-list-initializing
an object of type T with std::move(*rhs) | ||
rhs does not contain a value | destroys the contained value by calling val->T::~T() | no effect |
template<class... Args> T& emplace(Args&&... args);
template<class U, class... Args> T& emplace(initializer_list<U> il, Args&&... args);
void swap(optional& rhs) noexcept(see below);
*this contains a value | *this does not contain a value | |||
rhs contains a value | calls swap(*(*this), *rhs) | initializes the contained value of *this as if
direct-non-list-initializing an object of type T with the expression std::move(*rhs),
followed by rhs.val->T::~T();
postcondition is that *this contains a value and rhs does not contain a value | ||
rhs does not contain a value | initializes the contained value of rhs as if
direct-non-list-initializing an object of type T with the expression std::move(*(*this)),
followed by val->T::~T();
postcondition is that *this does not contain a value and rhs contains a value | no effect |
constexpr const T* operator->() const;
constexpr T* operator->();
constexpr const T& operator*() const&;
constexpr T& operator*() &;
constexpr T&& operator*() &&;
constexpr const T&& operator*() const&&;
constexpr explicit operator bool() const noexcept;
constexpr bool has_value() const noexcept;
constexpr const T& value() const&;
constexpr T& value() &;
constexpr T&& value() &&;
constexpr const T&& value() const&&;
template<class U> constexpr T value_or(U&& v) const&;
template<class U> constexpr T value_or(U&& v) &&;
struct nullopt_t{see below};
inline constexpr nullopt_t nullopt(unspecified);
const char* what() const noexcept override;
template<class T, class U> constexpr bool operator==(const optional<T>& x, const optional<U>& y);
template<class T, class U> constexpr bool operator!=(const optional<T>& x, const optional<U>& y);
template<class T, class U> constexpr bool operator<(const optional<T>& x, const optional<U>& y);
template<class T, class U> constexpr bool operator>(const optional<T>& x, const optional<U>& y);
template<class T, class U> constexpr bool operator<=(const optional<T>& x, const optional<U>& y);
template<class T, class U> constexpr bool operator>=(const optional<T>& x, const optional<U>& y);
template<class T, three_way_comparable_with<T> U>
constexpr compare_three_way_result_t<T,U>
operator<=>(const optional<T>& x, const optional<U>& y);
template<class T> constexpr bool operator==(const optional<T>& x, nullopt_t) noexcept;
template<class T> constexpr strong_ordering operator<=>(const optional<T>& x, nullopt_t) noexcept;
template<class T, class U> constexpr bool operator==(const optional<T>& x, const U& v);
template<class T, class U> constexpr bool operator==(const T& v, const optional<U>& x);
template<class T, class U> constexpr bool operator!=(const optional<T>& x, const U& v);
template<class T, class U> constexpr bool operator!=(const T& v, const optional<U>& x);
template<class T, class U> constexpr bool operator<(const optional<T>& x, const U& v);
template<class T, class U> constexpr bool operator<(const T& v, const optional<U>& x);
template<class T, class U> constexpr bool operator>(const optional<T>& x, const U& v);
template<class T, class U> constexpr bool operator>(const T& v, const optional<U>& x);
template<class T, class U> constexpr bool operator<=(const optional<T>& x, const U& v);
template<class T, class U> constexpr bool operator<=(const T& v, const optional<U>& x);
template<class T, class U> constexpr bool operator>=(const optional<T>& x, const U& v);
template<class T, class U> constexpr bool operator>=(const T& v, const optional<U>& x);
template<class T, three_way_comparable_with<T> U>
constexpr compare_three_way_result_t<T,U>
operator<=>(const optional<T>& x, const U& v);
template<class T> void swap(optional<T>& x, optional<T>& y) noexcept(noexcept(x.swap(y)));
template<class T> constexpr optional<decay_t<T>> make_optional(T&& v);
template<class T, class...Args>
constexpr optional<T> make_optional(Args&&... args);
template<class T, class U, class... Args>
constexpr optional<T> make_optional(initializer_list<U> il, Args&&... args);
template<class T> struct hash<optional<T>>;
constexpr variant() noexcept(see below);
constexpr variant(const variant& w);
constexpr variant(variant&& w) noexcept(see below);
template<class T> constexpr variant(T&& t) noexcept(see below);
template<class T, class... Args> constexpr explicit variant(in_place_type_t<T>, Args&&... args);
template<class T, class U, class... Args>
constexpr explicit variant(in_place_type_t<T>, initializer_list<U> il, Args&&... args);
template<size_t I, class... Args> constexpr explicit variant(in_place_index_t<I>, Args&&... args);
template<size_t I, class U, class... Args>
constexpr explicit variant(in_place_index_t<I>, initializer_list<U> il, Args&&... args);
~variant();
constexpr variant& operator=(const variant& rhs);
constexpr variant& operator=(variant&& rhs) noexcept(see below);
template<class T> variant& operator=(T&& t) noexcept(see below);
template<class T, class... Args> T& emplace(Args&&... args);
template<class T, class U, class... Args> T& emplace(initializer_list<U> il, Args&&... args);
template<size_t I, class... Args>
variant_alternative_t<I, variant<Types...>>& emplace(Args&&... args);
template<size_t I, class U, class... Args>
variant_alternative_t<I, variant<Types...>>& emplace(initializer_list<U> il, Args&&... args);
constexpr bool valueless_by_exception() const noexcept;
constexpr size_t index() const noexcept;
void swap(variant& rhs) noexcept(see below);
template<class T> struct variant_size;
template<class T> struct variant_size<const T>;
template<class... Types>
struct variant_size<variant<Types...>> : integral_constant<size_t, sizeof...(Types)> { };
template<size_t I, class T> struct variant_alternative<I, const T>;
variant_alternative<I, variant<Types...>>::type
template<class T, class... Types>
constexpr bool holds_alternative(const variant<Types...>& v) noexcept;
template<size_t I, class... Types>
constexpr variant_alternative_t<I, variant<Types...>>& get(variant<Types...>& v);
template<size_t I, class... Types>
constexpr variant_alternative_t<I, variant<Types...>>&& get(variant<Types...>&& v);
template<size_t I, class... Types>
constexpr const variant_alternative_t<I, variant<Types...>>& get(const variant<Types...>& v);
template<size_t I, class... Types>
constexpr const variant_alternative_t<I, variant<Types...>>&& get(const variant<Types...>&& v);
template<class T, class... Types> constexpr T& get(variant<Types...>& v);
template<class T, class... Types> constexpr T&& get(variant<Types...>&& v);
template<class T, class... Types> constexpr const T& get(const variant<Types...>& v);
template<class T, class... Types> constexpr const T&& get(const variant<Types...>&& v);
template<size_t I, class... Types>
constexpr add_pointer_t<variant_alternative_t<I, variant<Types...>>>
get_if(variant<Types...>* v) noexcept;
template<size_t I, class... Types>
constexpr add_pointer_t<const variant_alternative_t<I, variant<Types...>>>
get_if(const variant<Types...>* v) noexcept;
template<class T, class... Types>
constexpr add_pointer_t<T>
get_if(variant<Types...>* v) noexcept;
template<class T, class... Types>
constexpr add_pointer_t<const T>
get_if(const variant<Types...>* v) noexcept;
template<class... Types>
constexpr bool operator==(const variant<Types...>& v, const variant<Types...>& w);
template<class... Types>
constexpr bool operator!=(const variant<Types...>& v, const variant<Types...>& w);
template<class... Types>
constexpr bool operator<(const variant<Types...>& v, const variant<Types...>& w);
template<class... Types>
constexpr bool operator>(const variant<Types...>& v, const variant<Types...>& w);
template<class... Types>
constexpr bool operator<=(const variant<Types...>& v, const variant<Types...>& w);
template<class... Types>
constexpr bool operator>=(const variant<Types...>& v, const variant<Types...>& w);
template<class... Types> requires (three_way_comparable<Types> && ...)
constexpr common_comparison_category_t<compare_three_way_result_t<Types>...>
operator<=>(const variant<Types...>& v, const variant<Types...>& w);
template<class Visitor, class... Variants>
constexpr see below visit(Visitor&& vis, Variants&&... vars);
template<class R, class Visitor, class... Variants>
constexpr R visit(Visitor&& vis, Variants&&... vars);
struct monostate{};
constexpr bool operator==(monostate, monostate) noexcept { return true; }
constexpr strong_ordering operator<=>(monostate, monostate) noexcept
{ return strong_ordering::equal; }
template<class... Types>
void swap(variant<Types...>& v, variant<Types...>& w) noexcept(see below);
const char* what() const noexcept override;
template<class... Types> struct hash<variant<Types...>>;
template<> struct hash<monostate>;
const char* what() const noexcept override;
constexpr any() noexcept;
any(const any& other);
any(any&& other) noexcept;
template<class T>
any(T&& value);
template<class T, class... Args>
explicit any(in_place_type_t<T>, Args&&... args);
template<class T, class U, class... Args>
explicit any(in_place_type_t<T>, initializer_list<U> il, Args&&... args);
~any();
any& operator=(const any& rhs);
any& operator=(any&& rhs) noexcept;
template<class T>
any& operator=(T&& rhs);
template<class T, class... Args>
decay_t<T>& emplace(Args&&... args);
template<class T, class U, class... Args>
decay_t<T>& emplace(initializer_list<U> il, Args&&... args);
void reset() noexcept;
void swap(any& rhs) noexcept;
bool has_value() const noexcept;
const type_info& type() const noexcept;
void swap(any& x, any& y) noexcept;
template<class T, class... Args>
any make_any(Args&&... args);
template<class T, class U, class... Args>
any make_any(initializer_list<U> il, Args&&... args);
template<class T>
T any_cast(const any& operand);
template<class T>
T any_cast(any& operand);
template<class T>
T any_cast(any&& operand);
template<class T>
const T* any_cast(const any* operand) noexcept;
template<class T>
T* any_cast(any* operand) noexcept;
constexpr bitset() noexcept;
constexpr bitset(unsigned long long val) noexcept;
template<class charT, class traits, class Allocator>
explicit bitset(
const basic_string<charT, traits, Allocator>& str,
typename basic_string<charT, traits, Allocator>::size_type pos = 0,
typename basic_string<charT, traits, Allocator>::size_type n
= basic_string<charT, traits, Allocator>::npos,
charT zero = charT('0'),
charT one = charT('1'));
template<class charT>
explicit bitset(
const charT* str,
typename basic_string<charT>::size_type n = basic_string<charT>::npos,
charT zero = charT('0'),
charT one = charT('1'));
bitset<N>& operator&=(const bitset<N>& rhs) noexcept;
bitset<N>& operator|=(const bitset<N>& rhs) noexcept;
bitset<N>& operator^=(const bitset<N>& rhs) noexcept;
bitset<N>& operator<<=(size_t pos) noexcept;
bitset<N>& operator>>=(size_t pos) noexcept;
bitset<N>& set() noexcept;
bitset<N>& set(size_t pos, bool val = true);
bitset<N>& reset() noexcept;
bitset<N>& reset(size_t pos);
bitset<N> operator~() const noexcept;
bitset<N>& flip() noexcept;
bitset<N>& flip(size_t pos);
unsigned long to_ulong() const;
unsigned long long to_ullong() const;
template<class charT = char,
class traits = char_traits<charT>,
class Allocator = allocator<charT>>
basic_string<charT, traits, Allocator>
to_string(charT zero = charT('0'), charT one = charT('1')) const;
size_t count() const noexcept;
constexpr size_t size() const noexcept;
bool operator==(const bitset<N>& rhs) const noexcept;
bool test(size_t pos) const;
bool all() const noexcept;
bool any() const noexcept;
bool none() const noexcept;
bitset<N> operator<<(size_t pos) const noexcept;
bitset<N> operator>>(size_t pos) const noexcept;
constexpr bool operator[](size_t pos) const;
bitset<N>::reference operator[](size_t pos);
template<size_t N> struct hash<bitset<N>>;
bitset<N> operator&(const bitset<N>& lhs, const bitset<N>& rhs) noexcept;
bitset<N> operator|(const bitset<N>& lhs, const bitset<N>& rhs) noexcept;
bitset<N> operator^(const bitset<N>& lhs, const bitset<N>& rhs) noexcept;
template<class charT, class traits, size_t N>
basic_istream<charT, traits>&
operator>>(basic_istream<charT, traits>& is, bitset<N>& x);
template<class charT, class traits, size_t N>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const bitset<N>& x);
using element_type = see below;
using difference_type = see below;
template<class U> using rebind = see below;
static pointer pointer_traits::pointer_to(see below r);
static constexpr pointer pointer_traits<T*>::pointer_to(see below r) noexcept;
static element_type* to_address(pointer p) noexcept;
template<class T> constexpr T* to_address(T* p) noexcept;
template<class Ptr> constexpr auto to_address(const Ptr& p) noexcept;
void declare_reachable(void* p);
template<class T> T* undeclare_reachable(T* p);
void declare_no_pointers(char* p, size_t n);
void undeclare_no_pointers(char* p, size_t n);
pointer_safety get_pointer_safety() noexcept;
void* align(size_t alignment, size_t size, void*& ptr, size_t& space);
template<size_t N, class T>
[[nodiscard]] constexpr T* assume_aligned(T* ptr);
namespace std {
struct allocator_arg_t { explicit allocator_arg_t() = default; };
inline constexpr allocator_arg_t allocator_arg{};
}
template<class T, class Alloc> struct uses_allocator;
template<class T, class Alloc, class... Args>
constexpr auto uses_allocator_construction_args(const Alloc& alloc,
Args&&... args) noexcept -> see below;
template<class T, class Alloc, class Tuple1, class Tuple2>
constexpr auto uses_allocator_construction_args(const Alloc& alloc, piecewise_construct_t,
Tuple1&& x, Tuple2&& y)
noexcept -> see below;
template<class T, class Alloc>
constexpr auto uses_allocator_construction_args(const Alloc& alloc) noexcept -> see below;
template<class T, class Alloc, class U, class V>
constexpr auto uses_allocator_construction_args(const Alloc& alloc,
U&& u, V&& v) noexcept -> see below;
template<class T, class Alloc, class U, class V>
constexpr auto uses_allocator_construction_args(const Alloc& alloc,
const pair<U,V>& pr) noexcept -> see below;
template<class T, class Alloc, class U, class V>
constexpr auto uses_allocator_construction_args(const Alloc& alloc,
pair<U,V>&& pr) noexcept -> see below;
template<class T, class Alloc, class... Args>
constexpr T make_obj_using_allocator(const Alloc& alloc, Args&&... args);
template<class T, class Alloc, class... Args>
constexpr T* uninitialized_construct_using_allocator(T* p, const Alloc& alloc, Args&&... args);
using pointer = see below;
using const_pointer = see below;
using void_pointer = see below;
using const_void_pointer = see below;
using difference_type = see below;
using size_type = see below;
using propagate_on_container_copy_assignment = see below;
using propagate_on_container_move_assignment = see below;
using propagate_on_container_swap = see below;
using is_always_equal = see below;
template<class T> using rebind_alloc = see below;
[[nodiscard]] static constexpr pointer allocate(Alloc& a, size_type n);
[[nodiscard]] static constexpr pointer allocate(Alloc& a, size_type n, const_void_pointer hint);
static constexpr void deallocate(Alloc& a, pointer p, size_type n);
template<class T, class... Args>
static constexpr void construct(Alloc& a, T* p, Args&&... args);
template<class T>
static constexpr void destroy(Alloc& a, T* p);
static constexpr size_type max_size(const Alloc& a) noexcept;
static constexpr Alloc select_on_container_copy_construction(const Alloc& rhs);
[[nodiscard]] constexpr T* allocate(size_t n);
constexpr void deallocate(T* p, size_t n);
template<class T, class U>
constexpr bool operator==(const allocator<T>&, const allocator<U>&) noexcept;
template<class T> constexpr T* addressof(T& r) noexcept;
void* aligned_alloc(size_t alignment, size_t size);
void* calloc(size_t nmemb, size_t size);
void* malloc(size_t size);
void* realloc(void* ptr, size_t size);
void free(void* ptr);
template<class U> default_delete(const default_delete<U>& other) noexcept;
void operator()(T* ptr) const;
template<class U> default_delete(const default_delete<U[]>& other) noexcept;
template<class U> void operator()(U* ptr) const;
constexpr unique_ptr() noexcept;
constexpr unique_ptr(nullptr_t) noexcept;
explicit unique_ptr(pointer p) noexcept;
unique_ptr(pointer p, const D& d) noexcept;
unique_ptr(pointer p, remove_reference_t<D>&& d) noexcept;
unique_ptr(unique_ptr&& u) noexcept;
template<class U, class E> unique_ptr(unique_ptr<U, E>&& u) noexcept;
unique_ptr& operator=(unique_ptr&& u) noexcept;
template<class U, class E> unique_ptr& operator=(unique_ptr<U, E>&& u) noexcept;
unique_ptr& operator=(nullptr_t) noexcept;
add_lvalue_reference_t<T> operator*() const;
pointer operator->() const noexcept;
pointer get() const noexcept;
deleter_type& get_deleter() noexcept;
const deleter_type& get_deleter() const noexcept;
explicit operator bool() const noexcept;
pointer release() noexcept;
void reset(pointer p = pointer()) noexcept;
void swap(unique_ptr& u) noexcept;
template<class U> explicit unique_ptr(U p) noexcept;
template<class U> unique_ptr(U p, see below d) noexcept;
template<class U> unique_ptr(U p, see below d) noexcept;
template<class U, class E> unique_ptr(unique_ptr<U, E>&& u) noexcept;
template<class U, class E> unique_ptr& operator=(unique_ptr<U, E>&& u) noexcept;
T& operator[](size_t i) const;
void reset(nullptr_t p = nullptr) noexcept;
template<class U> void reset(U p) noexcept;
template<class T, class... Args> unique_ptr<T> make_unique(Args&&... args);
template<class T> unique_ptr<T> make_unique(size_t n);
template<class T, class... Args> unspecified make_unique(Args&&...) = delete;
template<class T> unique_ptr<T> make_unique_for_overwrite();
template<class T> unique_ptr<T> make_unique_for_overwrite(size_t n);
template<class T, class... Args> unspecified make_unique_for_overwrite(Args&&...) = delete;
template<class T, class D> void swap(unique_ptr<T, D>& x, unique_ptr<T, D>& y) noexcept;
template<class T1, class D1, class T2, class D2>
bool operator==(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y);
template<class T1, class D1, class T2, class D2>
bool operator<(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y);
template<class T1, class D1, class T2, class D2>
bool operator>(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y);
template<class T1, class D1, class T2, class D2>
bool operator<=(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y);
template<class T1, class D1, class T2, class D2>
bool operator>=(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y);
template<class T1, class D1, class T2, class D2>
requires three_way_comparable_with<typename unique_ptr<T1, D1>::pointer,
typename unique_ptr<T2, D2>::pointer>
compare_three_way_result_t<typename unique_ptr<T1, D1>::pointer,
typename unique_ptr<T2, D2>::pointer>
operator<=>(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y);
template<class T, class D>
bool operator==(const unique_ptr<T, D>& x, nullptr_t) noexcept;
template<class T, class D>
bool operator<(const unique_ptr<T, D>& x, nullptr_t);
template<class T, class D>
bool operator<(nullptr_t, const unique_ptr<T, D>& x);
template<class T, class D>
bool operator>(const unique_ptr<T, D>& x, nullptr_t);
template<class T, class D>
bool operator>(nullptr_t, const unique_ptr<T, D>& x);
template<class T, class D>
bool operator<=(const unique_ptr<T, D>& x, nullptr_t);
template<class T, class D>
bool operator<=(nullptr_t, const unique_ptr<T, D>& x);
template<class T, class D>
bool operator>=(const unique_ptr<T, D>& x, nullptr_t);
template<class T, class D>
bool operator>=(nullptr_t, const unique_ptr<T, D>& x);
template<class T, class D>
requires three_way_comparable_with<typename unique_ptr<T, D>::pointer, nullptr_t>
compare_three_way_result_t<typename unique_ptr<T, D>::pointer, nullptr_t>
operator<=>(const unique_ptr<T, D>& x, nullptr_t);
const char* what() const noexcept override;
constexpr weak_ptr() noexcept;
weak_ptr(const weak_ptr& r) noexcept;
template<class Y> weak_ptr(const weak_ptr<Y>& r) noexcept;
template<class Y> weak_ptr(const shared_ptr<Y>& r) noexcept;
weak_ptr(weak_ptr&& r) noexcept;
template<class Y> weak_ptr(weak_ptr<Y>&& r) noexcept;
~weak_ptr();
weak_ptr& operator=(const weak_ptr& r) noexcept;
template<class Y> weak_ptr& operator=(const weak_ptr<Y>& r) noexcept;
template<class Y> weak_ptr& operator=(const shared_ptr<Y>& r) noexcept;
weak_ptr& operator=(weak_ptr&& r) noexcept;
template<class Y> weak_ptr& operator=(weak_ptr<Y>&& r) noexcept;
long use_count() const noexcept;
bool expired() const noexcept;
shared_ptr<T> lock() const noexcept;
template<class U> bool owner_before(const shared_ptr<U>& b) const noexcept;
template<class U> bool owner_before(const weak_ptr<U>& b) const noexcept;
template<class T, class D> struct hash<unique_ptr<T, D>>;
~memory_resource();
[[nodiscard]] void* allocate(size_t bytes, size_t alignment = max_align);
void deallocate(void* p, size_t bytes, size_t alignment = max_align);
bool is_equal(const memory_resource& other) const noexcept;
virtual void* do_allocate(size_t bytes, size_t alignment) = 0;
virtual void do_deallocate(void* p, size_t bytes, size_t alignment) = 0;
virtual bool do_is_equal(const memory_resource& other) const noexcept = 0;
polymorphic_allocator() noexcept;
polymorphic_allocator(memory_resource* r);
template<class U> polymorphic_allocator(const polymorphic_allocator<U>& other) noexcept;
[[nodiscard]] Tp* allocate(size_t n);
void deallocate(Tp* p, size_t n);
[[nodiscard]] void* allocate_bytes(size_t nbytes, size_t alignment = alignof(max_align_t));
void deallocate_bytes(void* p, size_t nbytes, size_t alignment = alignof(max_align_t));
template<class T>
[[nodiscard]] T* allocate_object(size_t n = 1);
template<class T>
void deallocate_object(T* p, size_t n = 1);
template<class T, class... CtorArgs>
[[nodiscard]] T* new_object(CtorArgs&&... ctor_args);
template<class T>
void delete_object(T* p);
template<class T, class... Args>
void construct(T* p, Args&&... args);
template<class T>
void destroy(T* p);
polymorphic_allocator select_on_container_copy_construction() const;
memory_resource* resource() const;
memory_resource* new_delete_resource() noexcept;
memory_resource* null_memory_resource() noexcept;
memory_resource* set_default_resource(memory_resource* r) noexcept;
memory_resource* get_default_resource() noexcept;
size_t max_blocks_per_chunk;
size_t largest_required_pool_block;
synchronized_pool_resource(const pool_options& opts, memory_resource* upstream);
unsynchronized_pool_resource(const pool_options& opts, memory_resource* upstream);
virtual ~synchronized_pool_resource();
virtual ~unsynchronized_pool_resource();
void release();
memory_resource* upstream_resource() const;
pool_options options() const;
void* do_allocate(size_t bytes, size_t alignment) override;
void do_deallocate(void* p, size_t bytes, size_t alignment) override;
bool do_is_equal(const memory_resource& other) const noexcept override;
explicit monotonic_buffer_resource(memory_resource* upstream);
monotonic_buffer_resource(size_t initial_size, memory_resource* upstream);
monotonic_buffer_resource(void* buffer, size_t buffer_size, memory_resource* upstream);
~monotonic_buffer_resource();
void release();
memory_resource* upstream_resource() const;
void* do_allocate(size_t bytes, size_t alignment) override;
void do_deallocate(void* p, size_t bytes, size_t alignment) override;
bool do_is_equal(const memory_resource& other) const noexcept override;
using inner_allocator_type = see below;
using propagate_on_container_copy_assignment = see below;
using propagate_on_container_move_assignment = see below;
using propagate_on_container_swap = see below;
using is_always_equal = see below;
scoped_allocator_adaptor();
template<class OuterA2>
scoped_allocator_adaptor(OuterA2&& outerAlloc, const InnerAllocs&... innerAllocs) noexcept;
scoped_allocator_adaptor(const scoped_allocator_adaptor& other) noexcept;
scoped_allocator_adaptor(scoped_allocator_adaptor&& other) noexcept;
template<class OuterA2>
scoped_allocator_adaptor(
const scoped_allocator_adaptor<OuterA2, InnerAllocs...>& other) noexcept;
template<class OuterA2>
scoped_allocator_adaptor(scoped_allocator_adaptor<OuterA2, InnerAllocs...>&& other) noexcept;
inner_allocator_type& inner_allocator() noexcept;
const inner_allocator_type& inner_allocator() const noexcept;
outer_allocator_type& outer_allocator() noexcept;
const outer_allocator_type& outer_allocator() const noexcept;
[[nodiscard]] pointer allocate(size_type n);
[[nodiscard]] pointer allocate(size_type n, const_void_pointer hint);
void deallocate(pointer p, size_type n) noexcept;
size_type max_size() const;
template<class T, class... Args>
void construct(T* p, Args&&... args);
template<class T>
void destroy(T* p);
scoped_allocator_adaptor select_on_container_copy_construction() const;
template<class OuterA1, class OuterA2, class... InnerAllocs>
bool operator==(const scoped_allocator_adaptor<OuterA1, InnerAllocs...>& a,
const scoped_allocator_adaptor<OuterA2, InnerAllocs...>& b) noexcept;
template<class F, class... Args>
constexpr invoke_result_t<F, Args...> invoke(F&& f, Args&&... args)
noexcept(is_nothrow_invocable_v<F, Args...>);
template<class U>
constexpr reference_wrapper(U&& u) noexcept(see below);
constexpr reference_wrapper(const reference_wrapper& x) noexcept;
constexpr reference_wrapper& operator=(const reference_wrapper& x) noexcept;
constexpr operator T& () const noexcept;
constexpr T& get() const noexcept;
template<class... ArgTypes>
constexpr invoke_result_t<T&, ArgTypes...>
operator()(ArgTypes&&... args) const;
template<class T> constexpr reference_wrapper<T> ref(T& t) noexcept;
template<class T> constexpr reference_wrapper<T> ref(reference_wrapper<T> t) noexcept;
template<class T> constexpr reference_wrapper<const T> cref(const T& t) noexcept;
template<class T> constexpr reference_wrapper<const T> cref(reference_wrapper<T> t) noexcept;
template<class T = void> struct plus {
constexpr T operator()(const T& x, const T& y) const;
};
constexpr T operator()(const T& x, const T& y) const;
template<> struct plus<void> {
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) + std::forward<U>(u));
using is_transparent = unspecified;
};
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) + std::forward<U>(u));
template<class T = void> struct minus {
constexpr T operator()(const T& x, const T& y) const;
};
constexpr T operator()(const T& x, const T& y) const;
template<> struct minus<void> {
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) - std::forward<U>(u));
using is_transparent = unspecified;
};
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) - std::forward<U>(u));
template<class T = void> struct multiplies {
constexpr T operator()(const T& x, const T& y) const;
};
constexpr T operator()(const T& x, const T& y) const;
template<> struct multiplies<void> {
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) * std::forward<U>(u));
using is_transparent = unspecified;
};
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) * std::forward<U>(u));
template<class T = void> struct divides {
constexpr T operator()(const T& x, const T& y) const;
};
constexpr T operator()(const T& x, const T& y) const;
template<> struct divides<void> {
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) / std::forward<U>(u));
using is_transparent = unspecified;
};
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) / std::forward<U>(u));
template<class T = void> struct modulus {
constexpr T operator()(const T& x, const T& y) const;
};
constexpr T operator()(const T& x, const T& y) const;
template<> struct modulus<void> {
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) % std::forward<U>(u));
using is_transparent = unspecified;
};
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) % std::forward<U>(u));
template<class T = void> struct negate {
constexpr T operator()(const T& x) const;
};
constexpr T operator()(const T& x) const;
template<> struct negate<void> {
template<class T> constexpr auto operator()(T&& t) const
-> decltype(-std::forward<T>(t));
using is_transparent = unspecified;
};
template<class T> constexpr auto operator()(T&& t) const
-> decltype(-std::forward<T>(t));
template<class T = void> struct equal_to {
constexpr bool operator()(const T& x, const T& y) const;
};
constexpr bool operator()(const T& x, const T& y) const;
template<> struct equal_to<void> {
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) == std::forward<U>(u));
using is_transparent = unspecified;
};
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) == std::forward<U>(u));
template<class T = void> struct not_equal_to {
constexpr bool operator()(const T& x, const T& y) const;
};
constexpr bool operator()(const T& x, const T& y) const;
template<> struct not_equal_to<void> {
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) != std::forward<U>(u));
using is_transparent = unspecified;
};
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) != std::forward<U>(u));
template<class T = void> struct greater {
constexpr bool operator()(const T& x, const T& y) const;
};
constexpr bool operator()(const T& x, const T& y) const;
template<> struct greater<void> {
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) > std::forward<U>(u));
using is_transparent = unspecified;
};
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) > std::forward<U>(u));
template<class T = void> struct less {
constexpr bool operator()(const T& x, const T& y) const;
};
constexpr bool operator()(const T& x, const T& y) const;
template<> struct less<void> {
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) < std::forward<U>(u));
using is_transparent = unspecified;
};
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) < std::forward<U>(u));
template<class T = void> struct greater_equal {
constexpr bool operator()(const T& x, const T& y) const;
};
constexpr bool operator()(const T& x, const T& y) const;
template<> struct greater_equal<void> {
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) >= std::forward<U>(u));
using is_transparent = unspecified;
};
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) >= std::forward<U>(u));
template<class T = void> struct less_equal {
constexpr bool operator()(const T& x, const T& y) const;
};
constexpr bool operator()(const T& x, const T& y) const;
template<> struct less_equal<void> {
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) <= std::forward<U>(u));
using is_transparent = unspecified;
};
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) <= std::forward<U>(u));
template<class T, class U>
requires three_way_comparable_with<T, U> || BUILTIN-PTR-THREE-WAY(T, U)
constexpr auto operator()(T&& t, U&& u) const;
struct ranges::equal_to {
template<class T, class U>
requires equality_comparable_with<T, U> || BUILTIN-PTR-CMP(T, ==, U)
constexpr bool operator()(T&& t, U&& u) const;
using is_transparent = unspecified;
};
struct ranges::not_equal_to {
template<class T, class U>
requires equality_comparable_with<T, U> || BUILTIN-PTR-CMP(T, ==, U)
constexpr bool operator()(T&& t, U&& u) const;
using is_transparent = unspecified;
};
struct ranges::greater {
template<class T, class U>
requires totally_ordered_with<T, U> || BUILTIN-PTR-CMP(U, <, T)
constexpr bool operator()(T&& t, U&& u) const;
using is_transparent = unspecified;
};
struct ranges::less {
template<class T, class U>
requires totally_ordered_with<T, U> || BUILTIN-PTR-CMP(T, <, U)
constexpr bool operator()(T&& t, U&& u) const;
using is_transparent = unspecified;
};
struct ranges::greater_equal {
template<class T, class U>
requires totally_ordered_with<T, U> || BUILTIN-PTR-CMP(T, <, U)
constexpr bool operator()(T&& t, U&& u) const;
using is_transparent = unspecified;
};
struct ranges::less_equal {
template<class T, class U>
requires totally_ordered_with<T, U> || BUILTIN-PTR-CMP(U, <, T)
constexpr bool operator()(T&& t, U&& u) const;
using is_transparent = unspecified;
};
template<class T = void> struct logical_and {
constexpr bool operator()(const T& x, const T& y) const;
};
constexpr bool operator()(const T& x, const T& y) const;
template<> struct logical_and<void> {
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) && std::forward<U>(u));
using is_transparent = unspecified;
};
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) && std::forward<U>(u));
template<class T = void> struct logical_or {
constexpr bool operator()(const T& x, const T& y) const;
};
constexpr bool operator()(const T& x, const T& y) const;
template<> struct logical_or<void> {
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) || std::forward<U>(u));
using is_transparent = unspecified;
};
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) || std::forward<U>(u));
template<class T = void> struct logical_not {
constexpr bool operator()(const T& x) const;
};
constexpr bool operator()(const T& x) const;
template<> struct logical_not<void> {
template<class T> constexpr auto operator()(T&& t) const
-> decltype(!std::forward<T>(t));
using is_transparent = unspecified;
};
template<class T> constexpr auto operator()(T&& t) const
-> decltype(!std::forward<T>(t));
template<class T = void> struct bit_and {
constexpr T operator()(const T& x, const T& y) const;
};
constexpr T operator()(const T& x, const T& y) const;
template<> struct bit_and<void> {
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) & std::forward<U>(u));
using is_transparent = unspecified;
};
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) & std::forward<U>(u));
template<class T = void> struct bit_or {
constexpr T operator()(const T& x, const T& y) const;
};
constexpr T operator()(const T& x, const T& y) const;
template<> struct bit_or<void> {
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) | std::forward<U>(u));
using is_transparent = unspecified;
};
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) | std::forward<U>(u));
template<class T = void> struct bit_xor {
constexpr T operator()(const T& x, const T& y) const;
};
constexpr T operator()(const T& x, const T& y) const;
template<> struct bit_xor<void> {
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) ^ std::forward<U>(u));
using is_transparent = unspecified;
};
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) ^ std::forward<U>(u));
template<class T = void> struct bit_not {
constexpr T operator()(const T& x) const;
};
constexpr T operator()(const T& x) const;
template<> struct bit_not<void> {
template<class T> constexpr auto operator()(T&& t) const
-> decltype(~std::forward<T>(t));
using is_transparent = unspecified;
};
template<class T> constexpr auto operator()(T&&) const
-> decltype(~std::forward<T>(t));
struct identity {
template<class T>
constexpr T&& operator()(T&& t) const noexcept;
using is_transparent = unspecified;
};
template<class T>
constexpr T&& operator()(T&& t) const noexcept;
template<class F> constexpr unspecified not_fn(F&& f);
template<class F, class... Args>
constexpr unspecified bind_front(F&& f, Args&&... args);
template<class F, class... BoundArgs>
constexpr unspecified bind(F&& f, BoundArgs&&... bound_args);
template<class R, class F, class... BoundArgs>
constexpr unspecified bind(F&& f, BoundArgs&&... bound_args);
template<class R, class T> constexpr unspecified mem_fn(R T::* pm) noexcept;
const char* what() const noexcept override;
function() noexcept;
function(nullptr_t) noexcept;
function(const function& f);
function(function&& f) noexcept;
template<class F> function(F f);
template<class F> function(F) -> function<see below>;
function& operator=(const function& f);
function& operator=(function&& f);
function& operator=(nullptr_t) noexcept;
template<class F> function& operator=(F&& f);
template<class F> function& operator=(reference_wrapper<F> f) noexcept;
~function();
void swap(function& other) noexcept;
explicit operator bool() const noexcept;
R operator()(ArgTypes... args) const;
const type_info& target_type() const noexcept;
template<class T> T* target() noexcept;
template<class T> const T* target() const noexcept;
template<class R, class... ArgTypes>
bool operator==(const function<R(ArgTypes...)>& f, nullptr_t) noexcept;
template<class R, class... ArgTypes>
void swap(function<R(ArgTypes...)>& f1, function<R(ArgTypes...)>& f2) noexcept;
constexpr default_searcher(ForwardIterator pat_first, ForwardIterator pat_last,
BinaryPredicate pred = BinaryPredicate());
template<class ForwardIterator2>
constexpr pair<ForwardIterator2, ForwardIterator2>
operator()(ForwardIterator2 first, ForwardIterator2 last) const;
boyer_moore_searcher(RandomAccessIterator1 pat_first,
RandomAccessIterator1 pat_last,
Hash hf = Hash(),
BinaryPredicate pred = BinaryPredicate());
template<class RandomAccessIterator2>
pair<RandomAccessIterator2, RandomAccessIterator2>
operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
boyer_moore_horspool_searcher(RandomAccessIterator1 pat_first,
RandomAccessIterator1 pat_last,
Hash hf = Hash(),
BinaryPredicate pred = BinaryPredicate());
template<class RandomAccessIterator2>
pair<RandomAccessIterator2, RandomAccessIterator2>
operator()(RandomAccessIterator2 first, RandomAccessIterator2 last) const;
Template | Condition | Comments | |
T is void | |||
T is an integral type ([basic.fundamental]) | |||
T is a floating-point type ([basic.fundamental]) | |||
T is an array type ([basic.compound]) of known or unknown extent | |||
T is a pointer type ([basic.compound]) | Includes pointers to functions
but not pointers to non-static members. | ||
T is an lvalue reference type ([dcl.ref]) | |||
T is an rvalue reference type ([dcl.ref]) | |||
T is a pointer to data member | |||
T is a pointer to member function | |||
T is an enumeration type ([basic.compound]) | |||
T is a union type ([basic.compound]) | |||
T is a non-union class type ([basic.compound]) | |||
T is a function type ([basic.compound]) |
Template | Condition | Comments | |
T is an lvalue reference or an rvalue reference | |||
T is an arithmetic type ([basic.fundamental]) | |||
T is a fundamental type ([basic.fundamental]) | |||
T is an object type ([basic.types]) | |||
T is a scalar type ([basic.types]) | |||
T is a compound type ([basic.compound]) | |||
T is a pointer-to-member type |
Template | Condition | Preconditions | |
T is const-qualified ([basic.type.qualifier]) | |||
T is volatile-qualified ([basic.type.qualifier]) | |||
T is a trivial type ([basic.types]) | |||
T is a trivially copyable type ([basic.types]) | |||
T is a standard-layout type ([basic.types]) | |||
T is a class type, but not a union type, with no non-static data
members other than subobjects of zero size, no virtual member functions,
no virtual base classes, and no base class B for
which is_empty_v<B> is false. | |||
T is a polymorphic class ([class.virtual]) | |||
T is an abstract class ([class.abstract]) | |||
T is an aggregate type ([dcl.init.aggr]) | |||
If is_arithmetic_v<T> is true, the same result as
T(-1) < T(0);
otherwise, false | |||
If is_arithmetic_v<T> is true, the same result as
T(0) < T(-1);
otherwise, false | |||
T is an array type of known bound ([dcl.array]) | |||
T is an array type of unknown bound ([dcl.array]) | |||
For a function type T or
for a cv void type T,
is_constructible_v<T, Args...> is false,
otherwise see below | T and all types in the template parameter pack Args
shall be complete types, cv void,
or arrays of unknown bound. | ||
For a referenceable type T ([defns.referenceable]), the same result as
is_constructible_v<T, const T&>, otherwise false. | |||
Only the validity of the immediate context
of the assignment expression is considered. [Note 2: The compilation of the
expression can result in side effects such as the instantiation of class template
specializations and function template specializations, the generation of
implicitly-defined functions, and so on. Such side effects are not in the “immediate
context” and can result in the program being ill-formed. — end note] | |||
The expressions swap(declval<T>(), declval<U>()) and
swap(declval<U>(), declval<T>()) are each well-formed
when treated as an unevaluated operand
in an overload-resolution context
for swappable values ([swappable.requirements]). Only the validity of the immediate context
of the swap expressions is considered. [Note 3: The compilation of the expressions can result in side effects
such as the instantiation of class template specializations and
function template specializations,
the generation of implicitly-defined functions, and so on. Such side effects are not in the “immediate context” and
can result in the program being ill-formed. — end note] | |||
Either T is a reference type,
or T is a complete object type
for which the expression
declval<U&>().~U()
is well-formed
when treated as an unevaluated operand,
where U is
remove_all_extents_t<T>. | |||
is_constructible_v<T, Args...> is true and the variable definition for is_constructible, as defined below, is known to call no operation that is not trivial ([basic.types], [special]). | T and all types in the template parameter pack Args shall be complete types,
cv void, or arrays of unknown bound. | ||
For a referenceable type T, the same result as
is_trivially_constructible_v<T, const T&>, otherwise false. | |||
For a referenceable type T, the same result as
is_trivially_constructible_v<T, T&&>, otherwise false. | |||
is_assignable_v<T, U> is true and the assignment, as defined by
is_assignable, is known to call no operation that is not trivial
([basic.types], [special]). | |||
For a referenceable type T, the same result as
is_trivially_assignable_v<T&, const T&>, otherwise false. | |||
For a referenceable type T, the same result as
is_trivially_assignable_v<T&, T&&>, otherwise false. | |||
is_destructible_v<T> is true and
remove_all_extents_t<T> is either a non-class type or
a class type with a trivial destructor. | |||
is_constructible_v<T, Args...> is true
and the
variable definition for is_constructible, as defined below, is known not to
throw any exceptions ([expr.unary.noexcept]). | T and all types in the template parameter pack Args
shall be complete types, cv void,
or arrays of unknown bound. | ||
For a referenceable type T, the same result as
is_nothrow_constructible_v<T, const T&>, otherwise false. | |||
For a referenceable type T, the same result as
is_nothrow_constructible_v<T, T&&>, otherwise false. | |||
is_assignable_v<T, U> is true and the assignment is known not to
throw any exceptions ([expr.unary.noexcept]). | |||
For a referenceable type T, the same result as
is_nothrow_assignable_v<T&, const T&>, otherwise false. | |||
For a referenceable type T, the same result as
is_nothrow_assignable_v<T&, T&&>, otherwise false. | |||
is_swappable_with_v<T, U> is true and
each swap expression of the definition of
is_swappable_with<T, U> is known not to throw
any exceptions ([expr.unary.noexcept]). | |||
For a referenceable type T,
the same result as is_nothrow_swappable_with_v<T&, T&>,
otherwise false. | |||
is_destructible_v<T> is true and the indicated destructor is known
not to throw any exceptions ([expr.unary.noexcept]). | |||
T has a virtual destructor ([class.dtor]) | |||
For an array type T, the same result as
has_unique_object_representations_v<remove_all_extents_t<T>>,
otherwise see below. |
Template | Value | |
alignof(T). | ||
If T names an array type, an integer value representing
the number of dimensions of T; otherwise, 0. | ||
If T is not an array type, or if it has rank less
than or equal to I, or if I is 0 and T
has type “array of unknown bound of U”, then
0; otherwise, the bound ([dcl.array]) of the dimension of
T, where indexing of I is zero-based |
Template | Condition | Comments | |
T and U name the same type with the same cv-qualifications | |||
Base is a base class of Derived ([class.derived])
without regard to cv-qualifiers
or Base and Derived are not unions and
name the same class type
without regard to cv-qualifiers | |||
see below | |||
is_convertible_v<From, To> is true and
the conversion, as defined by is_convertible,
is known not to throw any exceptions ([expr.unary.noexcept]) | |||
Derived is unambiguously derived from Base
without regard to cv-qualifiers,
and each object of type Derived
is pointer-interconvertible ([basic.compound]) with
its Base subobject,
or Base and Derived are not unions
and name the same class type
without regard to cv-qualifiers. | If Base and Derived are non-union class types
and are not (possibly cv-qualified versions of) the same type,
Derived shall be a complete type. | ||
The expression INVOKE(declval<Fn>(), declval<ArgTypes>()...)
is well-formed when treated as an unevaluated operand | Fn and all types in the template parameter pack ArgTypes
shall be complete types, cv void, or
arrays of unknown bound. | ||
The expression INVOKE<R>(declval<Fn>(), declval<ArgTypes>()...)
is well-formed when treated as an unevaluated operand | Fn, R, and all types in the template parameter pack ArgTypes
shall be complete types, cv void, or
arrays of unknown bound. | ||
is_invocable_v< Fn, ArgTypes...> is true and the expression INVOKE(declval<Fn>(), declval<ArgTypes>()...) is known not to throw any exceptions ([expr.unary.noexcept]) | Fn and all types in the template parameter pack ArgTypes
shall be complete types, cv void, or
arrays of unknown bound. | ||
is_invocable_r_v< R, Fn, ArgTypes...> is true and the expression INVOKE<R>(declval<Fn>(), declval<ArgTypes>()...) is known not to throw any exceptions ([expr.unary.noexcept]) | Fn, R, and all types in the template parameter pack ArgTypes
shall be complete types, cv void, or
arrays of unknown bound. |
Template | Comments | |
If T is a reference, function, or top-level const-qualified
type, then type names
the same type as T, otherwise
T const. | ||
If T is a reference, function, or top-level volatile-qualified
type, then type names
the same type as T, otherwise
T volatile. | ||
Template | Comments | |
If T names a (possibly cv-qualified)
signed integer type then the member typedef
type names the type T; otherwise,
if T names a (possibly cv-qualified) unsigned integer
type then type names the corresponding
signed integer type, with the same cv-qualifiers as T;
otherwise, type names the signed integer type with smallest
rank for which
sizeof(T) == sizeof(type), with the same
cv-qualifiers as T. | ||
If T names a (possibly cv-qualified)
unsigned integer type then the member typedef
type names the type T; otherwise,
if T names a (possibly cv-qualified) signed integer
type then type names the corresponding
unsigned integer type, with the same cv-qualifiers as T;
otherwise, type names the unsigned integer type with smallest
rank for which
sizeof(T) == sizeof(type), with the same
cv-qualifiers as T. |
Template | Comments | |
If T has type “(possibly cv-qualified) pointer
to T1” then the member typedef type
names T1; otherwise, it names T. | ||
If T names a referenceable type or a
cv void type then
the member typedef type names the same type as
remove_reference_t<T>*;
otherwise, type names T. |
Template | Comments | |
The value of default-alignment shall be the most
stringent alignment requirement for any object type whose size
is no greater than Len ([basic.types]). The member typedef type shall be a trivial standard-layout type
suitable for use as uninitialized storage for any object whose size
is at most Len and whose alignment is a divisor of Align. | ||
The member typedef type shall be a trivial standard-layout type suitable for use as
uninitialized storage for any object whose type is listed in Types;
its size shall be at least Len. The static member alignment_value
shall be an integral constant of type size_t whose value is the
strictest alignment of all types listed in Types. Mandates: At least one type is provided. Each type in the template parameter pack Types
is a complete object type. | ||
[Note 1: This behavior is similar to the lvalue-to-rvalue ([conv.lval]),
array-to-pointer ([conv.array]), and function-to-pointer ([conv.func])
conversions applied when an lvalue is used as an rvalue, but also
strips cv-qualifiers from class types in order to more closely model by-value
argument passing. — end note] | ||
template<class... T> struct common_type; | ||
Unless this trait is specialized (as specified in Note D, below),
there shall be no member type. | ||
If T is an enumeration type, the member typedef type names
the underlying type of T ([dcl.enum]);
otherwise, there is no member type. | ||
If the expression INVOKE(declval<Fn>(), declval<ArgTypes>()...)
is well-formed when treated as an unevaluated operand,
the member typedef type names the type
decltype(INVOKE(declval<Fn>(), declval<ArgTypes>()...));
otherwise, there shall be no member type. Only the validity of the immediate context of the
expression is considered. [Note 2: The compilation of the expression can result in side effects such as
the instantiation of class template specializations and function
template specializations, the generation of implicitly-defined
functions, and so on. Such side effects are not in the “immediate
context” and can result in the program being ill-formed. — end note]
Preconditions: Fn and all types in the template parameter pack ArgTypes
are complete types, cv void, or arrays of
unknown bound. | ||
If T is
a specialization reference_wrapper<X> for some type X,
the member typedef type of unwrap_reference<T> is X&,
otherwise it is T. | ||
The member typedef type of unwrap_ref_decay<T>
denotes the type unwrap_reference_t<decay_t<T>>. |
template<class... B> struct conjunction : see below { };
template<class... B> struct disjunction : see below { };
template<class B> struct negation : see below { };
template<class S, class M>
constexpr bool is_pointer_interconvertible_with_class(M S::*m) noexcept;
template<class S1, class S2, class M1, class M2>
constexpr bool is_corresponding_member(M1 S1::*m1, M2 S2::*m2) noexcept;
constexpr bool is_constant_evaluated() noexcept;
Type | Value of X | Value of Y | |
ratio_add<R1, R2> | R1::num * R2::den + | R1::den * R2::den | |
R2::num * R1::den | |||
ratio_subtract<R1, R2> | R1::num * R2::den - | R1::den * R2::den | |
R2::num * R1::den | |||
ratio_multiply<R1, R2> | R1::num * R2::num | R1::den * R2::den | |
ratio_divide<R1, R2> | R1::num * R2::den | R1::den * R2::num |
template<class R1, class R2>
struct ratio_equal : bool_constant<R1::num == R2::num && R1::den == R2::den> { };
template<class R1, class R2>
struct ratio_not_equal : bool_constant<!ratio_equal_v<R1, R2>> { };
template<class R1, class R2>
struct ratio_less : bool_constant<see below> { };
template<class R1, class R2>
struct ratio_less_equal : bool_constant<!ratio_less_v<R2, R1>> { };
template<class R1, class R2>
struct ratio_greater : bool_constant<ratio_less_v<R2, R1>> { };
template<class R1, class R2>
struct ratio_greater_equal : bool_constant<!ratio_less_v<R1, R2>> { };
type_index(const type_info& rhs) noexcept;
bool operator==(const type_index& rhs) const noexcept;
bool operator<(const type_index& rhs) const noexcept;
bool operator>(const type_index& rhs) const noexcept;
bool operator<=(const type_index& rhs) const noexcept;
bool operator>=(const type_index& rhs) const noexcept;
strong_ordering operator<=>(const type_index& rhs) const noexcept;
size_t hash_code() const noexcept;
const char* name() const noexcept;
template<class T> struct is_execution_policy { see below };
class execution::parallel_unsequenced_policy { unspecified };
class execution::unsequenced_policy { unspecified };
inline constexpr execution::sequenced_policy execution::seq{ unspecified };
inline constexpr execution::parallel_policy execution::par{ unspecified };
inline constexpr execution::parallel_unsequenced_policy execution::par_unseq{ unspecified };
inline constexpr execution::unsequenced_policy execution::unseq{ unspecified };
to_chars_result to_chars(char* first, char* last, see below value, int base = 10);
to_chars_result to_chars(char* first, char* last, float value);
to_chars_result to_chars(char* first, char* last, double value);
to_chars_result to_chars(char* first, char* last, long double value);
to_chars_result to_chars(char* first, char* last, float value, chars_format fmt);
to_chars_result to_chars(char* first, char* last, double value, chars_format fmt);
to_chars_result to_chars(char* first, char* last, long double value, chars_format fmt);
to_chars_result to_chars(char* first, char* last, float value,
chars_format fmt, int precision);
to_chars_result to_chars(char* first, char* last, double value,
chars_format fmt, int precision);
to_chars_result to_chars(char* first, char* last, long double value,
chars_format fmt, int precision);
from_chars_result from_chars(const char* first, const char* last,
see below& value, int base = 10);
from_chars_result from_chars(const char* first, const char* last, float& value,
chars_format fmt = chars_format::general);
from_chars_result from_chars(const char* first, const char* last, double& value,
chars_format fmt = chars_format::general);
from_chars_result from_chars(const char* first, const char* last, long double& value,
chars_format fmt = chars_format::general);
Option | Meaning | |
< | ||
> | ||
^ | Forces the field to be centered within the available space
by inserting
characters before and
characters after the value, where
n is the total number of fill characters to insert. |
Option | Meaning | |
+ | ||
- | Indicates that a sign should be used for
negative numbers and negative zero only (this is the default behavior). | |
space | Indicates that a leading space should be used for
non-negative numbers other than negative zero, and
a minus sign for negative numbers and negative zero. |
Type | Meaning | |
none, s | Copies the string to the output. |
Type | Meaning | |
b | ||
B | ||
c | ||
d | to_chars(first, last, value). | |
o | ||
x | ||
X | ||
none |
Type | Meaning | |
a | If precision is specified, equivalent to
to_chars(first, last, value, chars_format::hex, precision)
where precision is the specified formatting precision; equivalent to
to_chars(first, last, value, chars_format::hex)
otherwise. | |
A | The same as a, except that
it uses uppercase letters for digits above 9 and
P to indicate the exponent. | |
e | Equivalent to
to_chars(first, last, value, chars_format::scientific, precision)
where precision is the specified formatting precision,
or 6 if precision is not specified. | |
E | ||
f, F | Equivalent to
to_chars(first, last, value, chars_format::fixed, precision)
where precision is the specified formatting precision,
or 6 if precision is not specified. | |
g | Equivalent to
to_chars(first, last, value, chars_format::general, precision)
where precision is the specified formatting precision,
or 6 if precision is not specified. | |
G | ||
none | If precision is specified, equivalent to
to_chars(first, last, value, chars_format::general, precision)
where precision is the specified formatting precision; equivalent to
to_chars(first, last, value)
otherwise. |
Type | Meaning | |
none, p | If uintptr_t is defined,
to_chars(first, last, reinterpret_cast<uintptr_t>(value), 16)
with the prefix 0x added to the output;
otherwise, implementation-defined. |
template<class... Args>
string format(string_view fmt, const Args&... args);
template<class... Args>
wstring format(wstring_view fmt, const Args&... args);
template<class... Args>
string format(const locale& loc, string_view fmt, const Args&... args);
template<class... Args>
wstring format(const locale& loc, wstring_view fmt, const Args&... args);
string vformat(string_view fmt, format_args args);
wstring vformat(wstring_view fmt, wformat_args args);
string vformat(const locale& loc, string_view fmt, format_args args);
wstring vformat(const locale& loc, wstring_view fmt, wformat_args args);
template<class Out, class... Args>
Out format_to(Out out, string_view fmt, const Args&... args);
template<class Out, class... Args>
Out format_to(Out out, wstring_view fmt, const Args&... args);
template<class Out, class... Args>
Out format_to(Out out, const locale& loc, string_view fmt, const Args&... args);
template<class Out, class... Args>
Out format_to(Out out, const locale& loc, wstring_view fmt, const Args&... args);
template<class Out>
Out vformat_to(Out out, string_view fmt,
format_args_t<type_identity_t<Out>, char> args);
template<class Out>
Out vformat_to(Out out, wstring_view fmt,
format_args_t<type_identity_t<Out>, wchar_t> args);
template<class Out>
Out vformat_to(Out out, const locale& loc, string_view fmt,
format_args_t<type_identity_t<Out>, char> args);
template<class Out>
Out vformat_to(Out out, const locale& loc, wstring_view fmt,
format_args_t<type_identity_t<Out>, wchar_t> args);
template<class Out, class... Args>
format_to_n_result<Out> format_to_n(Out out, iter_difference_t<Out> n,
string_view fmt, const Args&... args);
template<class Out, class... Args>
format_to_n_result<Out> format_to_n(Out out, iter_difference_t<Out> n,
wstring_view fmt, const Args&... args);
template<class Out, class... Args>
format_to_n_result<Out> format_to_n(Out out, iter_difference_t<Out> n,
const locale& loc, string_view fmt,
const Args&... args);
template<class Out, class... Args>
format_to_n_result<Out> format_to_n(Out out, iter_difference_t<Out> n,
const locale& loc, wstring_view fmt,
const Args&... args);
template<class... Args>
size_t formatted_size(string_view fmt, const Args&... args);
template<class... Args>
size_t formatted_size(wstring_view fmt, const Args&... args);
template<class... Args>
size_t formatted_size(const locale& loc, string_view fmt, const Args&... args);
template<class... Args>
size_t formatted_size(const locale& loc, wstring_view fmt, const Args&... args);
Expression | Return type | Requirement | |
f.parse(pc) | PC::iterator | Parses format-spec ([format.string])
for type T
in the range [pc.begin(), pc.end())
until the first unmatched character.
Stores the parsed format specifiers in *this and
returns an iterator past the end of the parsed range. | |
f.format(t, fc) | FC::iterator | ||
f.format(u, fc) | FC::iterator | As above, but does not modify u. |
constexpr explicit basic_format_parse_context(basic_string_view<charT> fmt,
size_t num_args = 0) noexcept;
constexpr const_iterator begin() const noexcept;
constexpr const_iterator end() const noexcept;
constexpr void advance_to(const_iterator it);
constexpr size_t next_arg_id();
constexpr void check_arg_id(size_t id);
basic_format_arg<basic_format_context> arg(size_t id) const;
std::locale locale();
iterator out();
void advance_to(iterator it);
basic_format_arg() noexcept;
template<class T> explicit basic_format_arg(const T& v) noexcept;
explicit basic_format_arg(float n) noexcept;
explicit basic_format_arg(double n) noexcept;
explicit basic_format_arg(long double n) noexcept;
explicit basic_format_arg(const char_type* s);
template<class traits>
explicit basic_format_arg(basic_string_view<char_type, traits> s) noexcept;
template<class traits, class Allocator>
explicit basic_format_arg(
const basic_string<char_type, traits, Allocator>& s) noexcept;
explicit basic_format_arg(nullptr_t) noexcept;
template<class T> explicit basic_format_arg(const T* p) noexcept;
explicit operator bool() const noexcept;
template<class T> explicit handle(const T& val) noexcept;
void format(basic_format_parse_context<char_type>& parse_ctx, Context& format_ctx) const;
template<class Visitor, class Context>
see below visit_format_arg(Visitor&& vis, basic_format_arg<Context> arg);
template<class Context = format_context, class... Args>
format-arg-store<Context, Args...> make_format_args(const Args&... args);
template<class... Args>
format-arg-store<wformat_context, Args...> make_wformat_args(const Args&... args);
basic_format_args() noexcept;
template<class... Args>
basic_format_args(const format-arg-store<Context, Args...>& store) noexcept;
basic_format_arg<Context> get(size_t i) const noexcept;
format_error(const string& what_arg);
format_error(const char* what_arg);