List of Tables [tab]


2.4 Trigraph sequences [lex.trigraph]

Table 1 — Trigraph sequences
Trigraph Replacement Trigraph Replacement Trigraph Replacement
??= # ??( [ ??< {
??/ \ ??) ] ??> }
??' ^ ??! | ??- ~

2.6 Alternative tokens [lex.digraph]

Table 2 — Alternative tokens
Alternative Primary Alternative Primary Alternative Primary
<% { and && and_eq &=
%> } bitor | or_eq |=
<: [ or || xor_eq ^=
:> ] xor ^ not !
%: # compl ~ not_eq !=
%:%: ## bitand &

2.11 Identifiers [lex.name]

Table 3 — Identifiers with special meaning
override final

2.12 Keywords [lex.key]

Table 4 — Keywords
alignas continue friend register true
alignof decltype goto reinterpret_cast try
asm default if return typedef
auto delete inline short typeid
bool do int signed typename
break double long sizeof union
case dynamic_cast mutable static unsigned
catch else namespace static_assert using
char enum new static_cast virtual
char16_t explicit noexcept struct void
char32_t export nullptr switch volatile
class extern operator template wchar_t
const false private this while
constexpr float protected thread_local
const_cast for public throw

2.12 Keywords [lex.key]

Table 5 — Alternative representations
and and_eq bitand bitor compl not
not_eq or or_eq xor xor_eq

2.14.2 Integer literals [lex.icon]

Table 6 — Types of integer constants
SuffixDecimal constantsOctal or hexadecimal constant
none int int
long int unsigned int
long long int long int
unsigned long int
long long int
unsigned long long int
u or U unsigned int unsigned int
unsigned long int unsigned long int
unsigned long long int unsigned long long int
l or L long int long int
long long int unsigned long int
long long int
unsigned long long int
Both u or U unsigned long int unsigned long int
and l or L unsigned long long int unsigned long long int
ll or LL long long int long long int
unsigned long long int
Both u or U unsigned long long int unsigned long long int
and ll or LL

2.14.3 Character literals [lex.ccon]

Table 7 — Escape sequences
new-line NL(LF) \n
horizontal tab HT \t
vertical tab VT \v
backspace BS \b
carriage return CR \r
form feed FF \f
alert BEL \a
backslash \ \\
question mark ? \?
single quote ' \'
double quote " \"
octal number ooo \ooo
hex number hhh \xhhh

2.14.5 String literals [lex.string]

Table 8 — String literal concatenations
Source Means Source Means Source Means
u"a" u"b" u"ab" U"a" U"b" U"ab" L"a" L"b" L"ab"
u"a" "b" u"ab" U"a" "b" U"ab" L"a" "b" L"ab"
"a" u"b" u"ab" "a" U"b" U"ab" "a" L"b" L"ab"

3.9.3 CV-qualifiers [basic.type.qualifier]

Table 9 — Relations on const and volatile
no cv-qualifier < const
no cv-qualifier < volatile
no cv-qualifier < const volatile
const < const volatile
volatile < const volatile

7.1.6.2 Simple type specifiers [dcl.type.simple]

Table 10simple-type-specifiers and the types they specify
Specifier(s) Type
type-name the type named
simple-template-id the type as defined in [temp.names]
char “char”
unsigned char “unsigned char”
signed char “signed char”
char16_t “char16_t”
char32_t “char32_t”
bool “bool”
unsigned “unsigned int”
unsigned int “unsigned int”
signed “int”
signed int “int”
int “int”
unsigned short int “unsigned short int”
unsigned short “unsigned short int”
unsigned long int “unsigned long int”
unsigned long “unsigned long int”
unsigned long long int “unsigned long long int”
unsigned long long “unsigned long long int”
signed long int “long int”
signed long “long int”
signed long long int “long long int”
signed long long “long long int”
long long int “long long int”
long long “long long int”
long int “long int”
long “long int”
signed short int “short int”
signed short “short int”
short int “short int”
short “short int”
wchar_t “wchar_t”
float “float”
double “double”
long double “long double”
void “void”
auto placeholder for a type to be deduced
decltype(expression) the type as defined below

13.3.1.2 Operators in expressions [over.match.oper]

Table 11 — Relationship between operator and function call notation
Subclause Expression As member function As non-member function
[over.unary] @a (a).operator@ ( ) operator@ (a)
[over.binary] a@b (a).operator@ (b) operator@ (a, b)
[over.ass] a=b (a).operator= (b)
[over.sub] a[b] (a).operator[](b)
[over.ref] a-> (a).operator-> ( )
[over.inc] a@ (a).operator@ (0) operator@ (a, 0)

13.3.3.1.1 Standard conversion sequences [over.ics.scs]

Table 12 — Conversions
Conversion Category Rank Subclause
No conversions required Identity
Lvalue-to-rvalue conversion [conv.lval]
Array-to-pointer conversion Lvalue Transformation Exact Match [conv.array]
Function-to-pointer conversion [conv.func]
Qualification conversions Qualification Adjustment [conv.qual]
Integral promotions [conv.prom]
Floating point promotion Promotion Promotion [conv.fpprom]
Integral conversions [conv.integral]
Floating point conversions [conv.double]
Floating-integral conversions [conv.fpint]
Pointer conversions Conversion Conversion [conv.ptr]
Pointer to member conversions [conv.mem]
Boolean conversions [conv.bool]

17.1 General [library.general]

Table 13 — Library categories
Clause Category
[language.support] Language support library
[diagnostics] Diagnostics library
[utilities] General utilities library
[strings] Strings library
[localization] Localization library
[containers] Containers library
[iterators] Iterators library
[algorithms] Algorithms library
[numerics] Numerics library
[input.output] Input/output library
[re] Regular expressions library
[atomics] Atomic operations library
[thread] Thread support library

17.6.1.2 Headers [headers]

Table 14 — C++ library headers
<algorithm> <fstream> <list> <regex> <tuple>
<array> <functional> <locale> <scoped_allocator> <type_traits>
<atomic> <future> <map> <set> <typeindex>
<bitset> <initializer_list> <memory> <sstream> <typeinfo>
<chrono> <iomanip> <mutex> <stack> <unordered_map>
<codecvt> <ios> <new> <stdexcept> <unordered_set>
<complex> <iosfwd> <numeric> <streambuf> <utility>
<condition_variable> <iostream> <ostream> <string> <valarray>
<deque> <istream> <queue> <strstream> <vector>
<exception> <iterator> <random> <system_error>
<forward_list> <limits> <ratio> <thread>

17.6.1.2 Headers [headers]

Table 15 — C++ headers for C library facilities
<cassert> <cinttypes> <csignal> <cstdio> <cwchar>
<ccomplex> <ciso646> <cstdalign> <cstdlib> <cwctype>
<cctype> <climits> <cstdarg> <cstring>
<cerrno> <clocale> <cstdbool> <ctgmath>
<cfenv> <cmath> <cstddef> <ctime>
<cfloat> <csetjmp> <cstdint> <cuchar>

17.6.1.3 Freestanding implementations [compliance]

Table 16 — C++ headers for freestanding implementations
Subclause Header(s)
<ciso646>
[support.types] Types <cstddef>
[support.limits] Implementation properties <cfloat> <limits> <climits>
[cstdint] Integer types <cstdint>
[support.start.term] Start and termination <cstdlib>
[support.dynamic] Dynamic memory management <new>
[support.rtti] Type identification <typeinfo>
[support.exception] Exception handling <exception>
[support.initlist] Initializer lists <initializer_list>
[support.runtime] Other runtime support <cstdalign> <cstdarg> <cstdbool>
[meta] Type traits <type_traits>
[atomics] Atomics <atomic>

17.6.3.1 Template argument requirements [utility.arg.requirements]

Table 17EqualityComparable requirements
Expression Return type Requirement
a == b convertible to bool == is an equivalence relation, that is, it has the following properties:
  • For all a, a == a.

  • If a == b, then b == a.

  • If a == b and b == c, then a == c.


17.6.3.1 Template argument requirements [utility.arg.requirements]

Table 18LessThanComparable requirements
Expression Return type Requirement
a < b convertible to bool < is a strict weak ordering relation ([alg.sorting])

17.6.3.1 Template argument requirements [utility.arg.requirements]

Table 19DefaultConstructible requirements
Expression Post-condition
T t; object t is default-initialized
T u{}; object u is value-initialized
T() a temporary object of type T is value-initialized
T{}

17.6.3.1 Template argument requirements [utility.arg.requirements]

Table 20MoveConstructible requirements
Expression Post-condition
T u = rv; u is equivalent to the value of rv before the construction
T(rv) T(rv) is equivalent to the value of rv before the construction
rv's state is unspecified [ Note: rv must still meet the requirements of the library component that is using it. The operations listed in those requirements must work as specified whether rv has been moved from or not.  — end note ]

17.6.3.1 Template argument requirements [utility.arg.requirements]

Table 21CopyConstructible requirements (in addition to MoveConstructible)
Expression Post-condition
T u = v; the value of v is unchanged and is equivalent to u
T(v) the value of v is unchanged and is equivalent to T(v)

17.6.3.1 Template argument requirements [utility.arg.requirements]

Table 22MoveAssignable requirements
Expression Return type Return value Post-condition
t = rv T& t t is equivalent to the value of rv before the assignment
rv's state is unspecified. [ Note: rv must still meet the requirements of the library component that is using it. The operations listed in those requirements must work as specified whether rv has been moved from or not.  — end note ]

17.6.3.1 Template argument requirements [utility.arg.requirements]

Table 23CopyAssignable requirements (in addition to MoveAssignable)
Expression Return type Return value Post-condition
t = v T& t t is equivalent to v, the value of v is unchanged

17.6.3.1 Template argument requirements [utility.arg.requirements]

Table 24Destructible requirements
Expression Post-condition
u.~T() All resources owned by u are reclaimed, no exception is propagated.

17.6.3.3 NullablePointer requirements [nullablepointer.requirements]

Table 25NullablePointer requirements
Expression Return type Operational semantics
P u(np);
post: u == nullptr
P u = np;
P(np) post: P(np) == nullptr
t = np P& post: t == nullptr
a != b contextually convertible to bool !(a == b)
a == np contextually convertible to bool a == P()
np == a
a != np contextually convertible to bool !(a == np)
np != a

17.6.3.4 Hash requirements [hash.requirements]

Table 26Hash requirements
Expression Return type Requirement
h(k) size_t The value returned shall depend only on the argument k. [ Note: Thus all evaluations of the expression h(k) with the same value for k yield the same result.  — end note ] [ Note: For two different values t1 and t2, the probability that h(t1) and h(t2) compare equal should be very small, approaching 1.0 / numeric_limits<size_t>::max().  — end note ]
h(u) size_t Shall not modify u.

17.6.3.5 Allocator requirements [allocator.requirements]

Table 27 — Descriptive variable definitions
VariableDefinition
T, U, C any non-const object type ([basic.types])
V a type convertible to T
X an Allocator class for type T
Y the corresponding Allocator class for type U
XX the type allocator_traits<X>
YY the type allocator_traits<Y>
t a value of type const T&
a, a1, a2 values of type X&
a3 an rvalue of type X
b a value of type Y
c a dereferenceable pointer of type C*
p a value of type XX::pointer, obtained by calling a1.allocate, where a1 == a
q a value of type XX::const_pointer obtained by conversion from a value p.
w a value of type XX::void_pointer obtained by conversion from a value p
z a value of type XX::const_void_pointer obtained by conversion from a value q or a value w
r a value of type T& obtained by the expression *p.
s a value of type const T& obtained by the expression *q or by conversion from a value r.
u a value of type YY::const_pointer obtained by calling YY::allocate, or else nullptr.
v a value of type V
n a value of type XX::size_type.
Args a template parameter pack
args a function parameter pack with the pattern Args&&

17.6.3.5 Allocator requirements [allocator.requirements]

Table 28 — Allocator requirements
ExpressionReturn typeAssertion/noteDefault
pre-/post-condition
X::pointer T*
X::const_pointer X::pointer is convertible to X::const_pointer pointer_traits<X::pointer>::rebind<const T>
X::void_pointer
Y::void_pointer
X::pointer is convertible to X::void_pointer. X::void_pointer and Y::void_pointer are the same type. pointer_traits<X::pointer>::rebind<void>
X::const_void_pointer
Y::const_void_pointer
X::pointer, X::const_pointer, and X::void_pointer are convertible to X::const_void_pointer. X::const_void_pointer and Y::const_void_pointer are the same type. pointer_traits<X::pointer>::rebind<const void>
X::value_type Identical to T
X::size_type unsigned integer type a type that can represent the size of the largest object in the allocation model. make_unsigned<X::difference_type>::type
X::difference_type signed integer type a type that can represent the difference between any two pointers in the allocation model. pointer_traits<X::pointer>::difference_type
typename X::template rebind<U>::other Y For all U (including T), Y::template rebind<T>::other is X. See Note A, below.
*p T&
*q const T& *q refers to the same object as *p
p->m type of T::m pre: (*p).m is well-defined. equivalent to (*p).m
q->m type of T::m pre: (*q).m is well-defined. equivalent to (*q).m
static_- cast<X::pointer>(w) X::pointer static_cast<X::pointer>(w) == p
static_cast<X ::const_pointer>(z) X::const_pointer static_cast<X ::const_pointer>(z) == q
a.allocate(n) X::pointer Memory is allocated for n objects of type T but objects are not constructed. allocate may raise an appropriate exception.181Note: If n == 0, the return value is unspecified.  — end note ]
a.allocate(n, u) X::pointer Same as a.allocate(n). The use of u is unspecified, but it is intended as an aid to locality. a.allocate(n)
a.deallocate(p,n) (not used) All n T objects in the area pointed to by p shall be destroyed prior to this call. n shall match the value passed to allocate to obtain this memory. Does not throw exceptions. [ Note: p shall not be singular. — end note ]
a.max_size() X::size_type the largest value that can meaningfully be passed to X::allocate() numeric_limits<size_type>::max()
a1 == a2 bool returns true only if storage allocated from each can be deallocated via the other. operator== shall be reflexive, symmetric, and transitive, and shall not exit via an exception.
a1 != a2 bool same as !(a1 == a2)
a == b bool same as a == Y::rebind<T>::other(b)
a != b bool same as !(a == b)
X a1(a); Shall not exit via an exception.
post: a1 == a
X a(b); Shall not exit via an exception.
post: Y(a) == b, a == X(b)
X a1(move(a)); Shall not exit via an exception.
post: a1 equals the prior value of a.
X a(move(b)); Shall not exit via an exception.
post: a equals the prior value of X(b).
a.construct(c, args) (not used) Effect: Constructs an object of type C at c ::new ((void*)c) C(forward<Args>(args)...)
a.destroy(c) (not used) Effect: Destroys the object at c c->~C()
a.select_on_container_copy_construction() X Typically returns either a or X() return a;
X::propagate_on_container_copy_assignment Identical to or derived from true_type or false_type true_type only if an allocator of type X should be copied when the client container is copy-assigned. false_type
X::propagate_on_container_move_assignment Identical to or derived from true_type or false_type true_type only if an allocator of type X should be moved when the client container is move-assigned. false_type
X::propagate_on_- container_swap Identical to or derived from true_type or false_type true_type only if an allocator of type X should be swapped when the client container is swapped. false_type

18.1 General [support.general]

Table 29 — Language support library summary
Subclause Header(s)
[support.types] Types <cstddef>
<limits>
[support.limits] Implementation properties <climits>
<cfloat>
[cstdint] Integer types <cstdint>
[support.start.term] Start and termination <cstdlib>
[support.dynamic] Dynamic memory management <new>
[support.rtti] Type identification <typeinfo>
[support.exception] Exception handling <exception>
[support.initlist] Initializer lists <initializer_list>
<csignal>
<csetjmp>
<cstdalign>
[support.runtime] Other runtime support <cstdarg>
<cstdbool>
<cstdlib>
<ctime>

18.2 Types [support.types]

Table 30 — Header <cstddef> synopsis
TypeName(s)
Macros: NULL offsetof
Types: ptrdiff_t size_t
max_align_t nullptr_t

18.3.3 C library [c.limits]

Table 31 — Header <climits> synopsis
TypeName(s)
Values:
CHAR_BIT INT_MAX LONG_MAX SCHAR_MIN SHRT_MIN ULLONG_MAX
CHAR_MAX LLONG_MAX LONG_MIN SCHAR_MAX UCHAR_MAX ULONG_MAX
CHAR_MIN LLONG_MIN MB_LEN_MAX SHRT_MAX UINT_MAX USHRT_MAX
INT_MIN

18.3.3 C library [c.limits]

Table 32 — Header <cfloat> synopsis
TypeName(s)
Values:
DBL_DIG DBL_MIN_EXP FLT_MAX_EXP LDBL_MANT_DIG
DBL_EPSILON DECIMAL_DIG FLT_MIN LDBL_MAX_10_EXP
DBL_MANT_DIG FLT_DIG FLT_MIN_10_EXP LDBL_MAX_EXP
DBL_MAX FLT_EPSILON FLT_MIN_EXP LDBL_MAX
DBL_MAX_10_EXP FLT_EVAL_METHOD FLT_RADIX LDBL_MIN
DBL_MAX_EXP FLT_MANT_DIG FLT_ROUNDS LDBL_MIN_10_EXP
DBL_MIN FLT_MAX LDBL_DIG LDBL_MIN_EXP
DBL_MIN_10_EXP FLT_MAX_10_EXP LDBL_EPSILON

18.5 Start and termination [support.start.term]

Table 33 — Header <cstdlib> synopsis
TypeName(s)
Macros: EXIT_FAILURE EXIT_SUCCESS
Functions: _Exit abort atexit
at_quick_exit exit quick_exit

18.10 Other runtime support [support.runtime]

Table 34 — Header <csetjmp> synopsis
TypeName(s)
Macro: setjmp
Type: jmp_buf
Function: longjmp

18.10 Other runtime support [support.runtime]

Table 35 — Header <csignal> synopsis
TypeName(s)
Macros: SIGABRT SIGILL SIGSEGV SIG_DFL
SIG_IGN SIGFPE SIGINT SIGTERM SIG_ERR
Type: sig_atomic_t
Functions: raise signal

18.10 Other runtime support [support.runtime]

Table 36 — Header <cstdalign> synopsis
TypeName(s)
Macro: __alignas_is_defined

18.10 Other runtime support [support.runtime]

Table 37 — Header <cstdarg> synopsis
TypeName(s)
Macros: va_arg va_end va_start
va_copy
Type: va_list

18.10 Other runtime support [support.runtime]

Table 38 — Header <cstdbool> synopsis
TypeName(s)
Macro: __bool_true_false_are_defined

18.10 Other runtime support [support.runtime]

Table 39 — Header <cstdlib> synopsis
TypeName(s)
Functions: getenv system

18.10 Other runtime support [support.runtime]

Table 40 — Header <ctime> synopsis
TypeName(s)
Macro: CLOCKS_PER_SEC
Type: clock_t
Function: clock

19.1 General [diagnostics.general]

Table 41 — Diagnostics library summary
Subclause Header(s)
[std.exceptions] Exception classes <stdexcept>
[assertions] Assertions <cassert>
[errno] Error numbers <cerrno>
[syserr] System error support <system_error>

19.3 Assertions [assertions]

Table 42 — Header <cassert> synopsis
TypeName(s)
Macro: assert

19.4 Error numbers [errno]

Table 43 — Header <cerrno> synopsis
TypeName(s)
Macros: ECONNREFUSED EIO ENODEV ENOTEMPTY ERANGE
E2BIG ECONNRESET EISCONN ENOENT ENOTRECOVERABLE EROFS
EACCES EDEADLK EISDIR ENOEXEC ENOTSOCK ESPIPE
EADDRINUSE EDESTADDRREQ ELOOP ENOLCK ENOTSUP ESRCH
EADDRNOTAVAIL EDOM EMFILE ENOLINK ENOTTY ETIME
EAFNOSUPPORT EEXIST EMLINK ENOMEM ENXIO ETIMEDOUT
EAGAIN EFAULT EMSGSIZE ENOMSG EOPNOTSUPP ETXTBSY
EALREADY EFBIG ENAMETOOLONG ENOPROTOOPT EOVERFLOW EWOULDBLOCK
EBADF EHOSTUNREACH ENETDOWN ENOSPC EOWNERDEAD EXDEV
EBADMSG EIDRM ENETRESET ENOSR EPERM errno
EBUSY EILSEQ ENETUNREACH ENOSTR EPIPE
ECANCELED EINPROGRESS ENFILE ENOSYS EPROTO
ECHILD EINTR ENOBUFS ENOTCONN EPROTONOSUPPORT
ECONNABORTED EINVAL ENODATA ENOTDIR EPROTOTYPE

20.1 General [utilities.general]

Table 44 — General utilities library summary
Subclause Header(s)
[utility] Utility components <utility>
[pairs] Pairs <utility>
[tuple] Tuples <tuple>
[template.bitset] Fixed-size sequences of bits <bitset>
<memory>
[memory] Memory <cstdlib>
<cstring>
[smartptr] Smart pointers <memory>
[function.objects] Function objects <functional>
[meta] Type traits <type_traits>
[ratio] Compile-time rational arithmetic <ratio>
[time] Time utilities <chrono>
<ctime>
[allocator.adaptor] Scoped allocators <scoped_allocator>
[type.index] Type indexes <typeindex>

20.6.13 C library [c.malloc]

Table 45 — Header <cstdlib> synopsis
TypeName(s)
Functions: calloc malloc
free realloc

20.6.13 C library [c.malloc]

Table 46 — Header <cstring> synopsis
TypeName(s)
Macro: NULL
Type: size_t
Functions: memchr memcmp
memcpy memmove memset

20.9.4.1 Primary type categories [meta.unary.cat]

Table 47 — Primary type category predicates
TemplateConditionComments
template <class T>
struct is_void;
T is void
template <class T>
struct is_integral;
T is an integral type ([basic.fundamental])
template <class T>
struct is_floating_point;
T is a floating point type ([basic.fundamental])
template <class T>
struct is_array;
T is an array type ([basic.compound]) of known or unknown extent Class template array ([array]) is not an array type.
template <class T>
struct is_pointer;
T is a pointer type ([basic.compound]) Includes pointers to functions but not pointers to non-static members.
template <class T>
struct is_lvalue_reference;
T is an lvalue reference type ([dcl.ref])
template <class T>
struct is_rvalue_reference;
T is an rvalue reference type ([dcl.ref])
template <class T>
struct is_member_object_pointer;
T is a pointer to non-static data member
template <class T>
struct is_member_function_pointer;
T is a pointer to non-static member function
template <class T>
struct is_enum;
T is an enumeration type ([basic.compound])
template <class T>
struct is_union;
T is a union type ([basic.compound])
template <class T>
struct is_class;
T is a class type but not a union type ([basic.compound])
template <class T>
struct is_function;
T is a function type ([basic.compound])

20.9.4.2 Composite type traits [meta.unary.comp]

Table 48 — Composite type category predicates
TemplateConditionComments
template <class T>
struct is_reference;
T is an lvalue reference or an rvalue reference
template <class T>
struct is_arithmetic;
T is an arithmetic type ([basic.fundamental])
template <class T>
struct is_fundamental;
T is a fundamental type ([basic.fundamental])
template <class T>
struct is_object;
T is an object type ([basic.types])
template <class T>
struct is_scalar;
T is a scalar type ([basic.types])
template <class T>
struct is_compound;
T is a compound type ([basic.compound])
template <class T>
struct is_member_pointer;
T is a pointer to non-static data member or non-static member function

20.9.4.3 Type properties [meta.unary.prop]

Table 49 — Type property predicates
TemplateConditionPreconditions
template <class T>
struct is_const;
T is const-qualified ([basic.type.qualifier])
template <class T>
struct is_volatile;
T is volatile-qualified ([basic.type.qualifier])
template <class T>
struct is_trivial;
T is a trivial type ([basic.types]) T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T>
struct is_trivially_copyable;
T is a trivially copyable type ([basic.types]) T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T>
struct is_standard_layout;
T is a standard-layout type ([basic.types]) T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T>
struct is_pod;
T is a POD type ([basic.types]) T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T>
struct is_literal_type;
T is a literal type ([basic.types]) T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T>
struct is_empty;
T is a class type, but not a union type, with no non-static data members other than bit-fields of length 0, no virtual member functions, no virtual base classes, and no base class B for which is_empty<B>::value is false. T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T>
struct is_polymorphic;
T is a polymorphic class ([class.virtual]) T shall be a complete type, type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T>
struct is_abstract;
T is an abstract class ([class.abstract]) T shall be a complete type, type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T>
struct is_signed;
is_arithmetic<T>::value && T(-1) < T(0)
template <class T>
struct is_unsigned;
is_arithmetic<T>::value && T(0) < T(-1)
template <class T, class... Args>
struct is_constructible;
see below T and all types in the parameter pack Args shall be complete types, (possibly cv-qualified) void, or arrays of unknown bound.
template <class T>
struct is_default_constructible;
is_constructible<T>::value is true. T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T>
struct is_copy_constructible;
is_constructible<T, const T&>::value is true. T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T>
struct is_move_constructible;
is_constructible<T, T&&>::value is true. T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T, class U>
struct is_assignable;
The expression declval<T>() = declval<U>() is well-formed when treated as an unevaluated operand (Clause [expr]). Access checking is performed as if in a context unrelated to T and U. Only the validity of the immediate context of the assignment expression is considered. [ Note: 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 ] T and U shall be complete types, (possibly cv-qualified) void, or arrays of unknown bound.
template <class T>
struct is_copy_assignable;
is_assignable<T&, const T&>::value is true. T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T>
struct is_move_assignable;
is_assignable<T&, T&&>::value is true. T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T>
struct is_destructible;
For a complete type T and given
template <class U> struct test { U u; };,
test<T>::~test() is not deleted.
T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T, class... Args>
struct
is_trivially_constructible;
is_constructible<T,
Args...>::value 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 parameter pack Args shall be complete types, (possibly cv-qualified) void, or arrays of unknown bound.
template <class T>
struct is_trivially_default_constructible;
is_trivially_constructible<T>::value is true. T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T>
struct is_trivially_copy_constructible;
is_trivially_constructible<T, const T&>::value is true. T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T>
struct is_trivially_move_constructible;
is_trivially_constructible<T, T&&>::value is true. T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T, class U>
struct is_trivially_assignable;
is_assignable<T, U>::value is true and the assignment, as defined by is_assignable, is known to call no operation that is not trivial ([basic.types], [special]). T and U shall be complete types, (possibly cv-qualified) void, or arrays of unknown bound.
template <class T>
struct is_trivially_copy_assignable;
is_trivially_assignable<T&, const T&>::value is true. T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T>
struct is_trivially_move_assignable;
is_trivially_assignable<T&, T&&>::value is true. T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T>
struct is_trivially_destructible;
is_destructible<T>::value is true and the indicated destructor is known to be trivial. T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T, class... Args>
struct is_nothrow_constructible;
is_constructible<T, Args...>::value 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 parameter pack Args shall be complete types, (possibly cv-qualified) void, or arrays of unknown bound.
template <class T>
struct is_nothrow_default_constructible;
is_nothrow_constructible<T>::value is true. T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T>
struct is_nothrow_copy_constructible;
is_nothrow_constructible<T, const T&>::value is true. T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T>
struct is_nothrow_move_constructible;
is_nothrow_constructible<T, T&&>::value is true. T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T, class U>
struct is_nothrow_assignable;
is_assignable<T, U>::value is true and the assignment is known not to throw any exceptions ([expr.unary.noexcept]). T and U shall be complete types, (possibly cv-qualified) void, or arrays of unknown bound.
template <class T>
struct is_nothrow_copy_assignable;
is_nothrow_assignable<T&, const T&>::value is true. T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T>
struct is_nothrow_move_assignable;
is_nothrow_assignable<T&, T&&>::value is true. T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T>
struct is_nothrow_destructible;
is_destructible<T>::value is true and the indicated destructor is known not to throw any exceptions ([expr.unary.noexcept]). T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.
template <class T>
struct has_virtual_destructor;
T has a virtual destructor ([class.dtor]) T shall be a complete type, (possibly cv-qualified) void, or an array of unknown bound.

20.9.5 Type property queries [meta.unary.prop.query]

Table 50 — Type property queries
TemplateValue
template <class T>
struct alignment_of;
alignof(T).
Requires: alignof(T) shall be a valid expression ([expr.alignof])
template <class T>
struct rank;
If T names an array type, an integer value representing the number of dimensions of T; otherwise, 0.
template <class T,
unsigned I = 0>
struct extent;
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 I'th dimension of T, where indexing of I is zero-based

20.9.6 Relationships between types [meta.rel]

Table 51 — Type relationship predicates
TemplateConditionComments
template <class T, class U>
struct is_same;
T and U name the same type with the same cv-qualifications
template <class Base, class Derived>
struct is_base_of;
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 If Base and Derived are class types and are different types (ignoring possible cv-qualifiers) then Derived shall be a complete type. [ Note: Base classes that are private, protected, or ambiguous are, nonetheless, base classes.  — end note ]
template <class From, class To>
struct is_convertible;
see below From and To shall be complete types, arrays of unknown bound, or (possibly cv-qualified) void types.

20.9.7.1 Const-volatile modifications [meta.trans.cv]

Table 52 — Const-volatile modifications
TemplateComments
template <class T>
struct remove_const;
The member typedef type shall name the same type as T except that any top-level const-qualifier has been removed. [ Example: remove_const<const volatile int>::type evaluates to volatile int, whereas remove_const<const int*>::type evaluates to const int*.  — end example ]
template <class T>
struct remove_volatile;
The member typedef type shall name the same type as T except that any top-level volatile-qualifier has been removed. [ Example: remove_volatile<const volatile int>::type evaluates to const int, whereas remove_volatile<volatile int*>::type evaluates to volatile int*.  — end example ]
template <class T>
struct remove_cv;
The member typedef type shall be the same as T except that any top-level cv-qualifier has been removed. [ Example: remove_cv<const volatile int>::type evaluates to int, whereas remove_cv<const volatile int*>::type evaluates to const volatile int*.  — end example ]
template <class T>
struct add_const;
If T is a reference, function, or top-level const-qualified type, then type shall name the same type as T, otherwise T const.
template <class T>
struct add_volatile;
If T is a reference, function, or top-level volatile-qualified type, then type shall name the same type as T, otherwise T volatile.
template <class T>
struct add_cv;
The member typedef type shall name the same type as add_const<typename add_volatile<T>::type>::type.

20.9.7.2 Reference modifications [meta.trans.ref]

Table 53 — Reference modifications
TemplateComments
template <class T>
struct remove_reference;
If T has type “reference to T1” then the member typedef type shall name T1; otherwise, type shall name T.
template <class T>
struct add_lvalue_reference;
If T names an object or function type then the member typedef type shall name T&; otherwise, if T names a type “rvalue reference to T1” then the member typedef type shall name T1&; otherwise, type shall name T.
template <class T>
struct add_rvalue_reference;
If T names an object or function type then the member typedef type shall name T&&; otherwise, type shall name T. [ Note: This rule reflects the semantics of reference collapsing ([dcl.ref]). For example, when a type T names a type T1&, the type add_rvalue_reference<T>::type is not an rvalue reference.  — end note ]

20.9.7.3 Sign modifications [meta.trans.sign]

Table 54 — Sign modifications
TemplateComments
template <class T>
struct make_signed;
If T names a (possibly cv-qualified) signed integer type ([basic.fundamental]) then the member typedef type shall name the type T; otherwise, if T names a (possibly cv-qualified) unsigned integer type then type shall name the corresponding signed integer type, with the same cv-qualifiers as T; otherwise, type shall name the signed integer type with smallest rank ([conv.rank]) for which sizeof(T) == sizeof(type), with the same cv-qualifiers as T.
Requires: T shall be a (possibly cv-qualified) integral type or enumeration but not a bool type.
template <class T>
struct make_unsigned;
If T names a (possibly cv-qualified) unsigned integer type ([basic.fundamental]) then the member typedef type shall name the type T; otherwise, if T names a (possibly cv-qualified) signed integer type then type shall name the corresponding unsigned integer type, with the same cv-qualifiers as T; otherwise, type shall name the unsigned integer type with smallest rank ([conv.rank]) for which sizeof(T) == sizeof(type), with the same cv-qualifiers as T.
Requires: T shall be a (possibly cv-qualified) integral type or enumeration but not a bool type.

20.9.7.4 Array modifications [meta.trans.arr]

Table 55 — Array modifications
TemplateComments
template <class T>
struct remove_extent;
If T names a type “array of U”, the member typedef type shall be U, otherwise T. [ Note: For multidimensional arrays, only the first array dimension is removed. For a type “array of const U”, the resulting type is const U.  — end note ]
template <class T>
struct remove_all_extents;
If T is “multi-dimensional array of U”, the resulting member typedef type is U, otherwise T.

20.9.7.5 Pointer modifications [meta.trans.ptr]

Table 56 — Pointer modifications
TemplateComments
template <class T>
struct remove_pointer;
If T has type “(possibly cv-qualified) pointer to T1” then the member typedef type shall name T1; otherwise, it shall name T.
template <class T>
struct add_pointer;
The member typedef type shall name the same type as remove_reference<T>::type*.

20.9.7.6 Other transformations [meta.trans.other]

Table 57 — Other transformations
TemplateConditionComments
template <std::size_t Len,
std::size_t Align
= default-alignment>
struct aligned_storage;
Len shall not be zero. Align shall be equal to alignof(T) for some type T or to default-alignment. The value of default-alignment shall be the most stringent alignment requirement for any C++ object type whose size is no greater than Len ([basic.types]). The member typedef type shall be a POD type suitable for use as uninitialized storage for any object whose size is at most Len and whose alignment is a divisor of Align.
template <std::size_t Len,
class... Types>
struct aligned_union;
At least one type is provided. The member typedef type shall be a POD 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 std::size_t whose value is the strictest alignment of all types listed in Types.
template <class T> struct decay; Let U be remove_reference<T>::type. If is_array<U>::value is true, the member typedef type shall equal remove_extent<U>::type*. If is_function<U>::value is true, the member typedef type shall equal add_pointer<U>::type. Otherwise the member typedef type equals remove_cv<U>::type. [ Note: 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 expression 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 <bool B, class T = void> struct enable_if; If B is true, the member typedef type shall equal T; otherwise, there shall be no member typedef type.
template <bool B, class T, class F> struct conditional; If B is true, the member typedef type shall equal T. If B is false, the member typedef type shall equal F.
template <class... T> struct common_type; The member typedef type shall be defined as set out below. All types in the parameter pack T shall be complete or (possibly cv) void. A program may specialize this trait if at least one template parameter in the specialization is a user-defined type. [ Note: Such specializations are needed when only explicit conversions are desired among the template arguments.  — end note ]
template <class T>
struct underlying_type;
T shall be an enumeration type ([dcl.enum]) The member typedef type shall name the underlying type of T.
template <class Fn,
class... ArgTypes> struct result_of<Fn(ArgTypes...)>;
Fn shall be a callable type ([func.def]), reference to function, or reference to callable type. The expression decltype(INVOKE(declval<Fn>(), declval<ArgTypes>()...)) shall be well formed. The member typedef type shall name the type decltype(INVOKE(declval<Fn>(), declval<ArgTypes>()...))

20.10.4 Arithmetic on ratios [ratio.arithmetic]

Table 58 — Expressions used to perform ratio arithmetic
TypeValue of XValue 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

20.11.3 Clock requirements [time.clock.req]

Table 59 — Clock requirements
ExpressionReturn typeOperational semantics
C1::rep An arithmetic type or a class emulating an arithmetic type The representation type of C1::duration.
C1::period a specialization of ratio The tick period of the clock in seconds.
C1::duration chrono::duration<C1::rep, C1::period> The duration type of the clock.
C1::time_point chrono::time_point<C1> or chrono::time_point<C2, C1::duration> The time_point type of the clock. C1 and C2 shall refer to the same epoch.
C1::is_steady const bool true if t1 <= t2 is always true and the time between clock ticks is constant, otherwise false.
C1::now() C1::time_point Returns a time_point object representing the current point in time.

20.11.8 Date and time functions [date.time]

Table 60 — Header <ctime> synopsis
TypeName(s)
Macros: NULL CLOCKS_PER_SEC
Types: size_t clock_t time_t
Struct: tm
Functions:
asctime clock difftime localtime strftime
ctime gmtime mktime time

21.1 General [strings.general]

Table 61 — Strings library summary
Subclause Header(s)
[char.traits] Character traits <string>
[string.classes] String classes <string>
<cctype>
<cwctype>
[c.strings] Null-terminated sequence utilities <cstring>
<cwchar>
<cstdlib>
<cuchar>

21.2.1 Character traits requirements [char.traits.require]

Table 62 — Character traits requirements
ExpressionReturn typeAssertion/noteComplexity
pre-/post-condition
X::char_type charT (described in [char.traits.typedefs]) compile-time
X::int_type (described in [char.traits.typedefs]) compile-time
X::off_type (described in [char.traits.typedefs]) compile-time
X::pos_type (described in [char.traits.typedefs]) compile-time
X::state_type (described in [char.traits.typedefs]) compile-time
X::eq(c,d) bool yields: whether c is to be treated as equal to d. constant
X::lt(c,d) bool yields: whether c is to be treated as less than d. constant
X::compare(p,q,n) int yields: 0 if for each i in [0,n), X::eq(p[i],q[i]) is true; else, a negative value if, for some j in [0,n), X::lt(p[j],q[j]) is true and for each i in [0,j) X::eq(p[i],q[i]) is true; else a positive value. linear
X::length(p) std::size_t yields: the smallest i such that X::eq(p[i],charT()) is true. linear
X::find(p,n,c) const X::char_type* yields: the smallest q in [p,p+n) such that X::eq(*q,c) is true, zero otherwise. linear
X::move(s,p,n) X::char_type* for each i in [0,n), performs X::assign(s[i],p[i]). Copies correctly even where the ranges [p,p+n) and [s,s+n) overlap. yields: s. linear
X::copy(s,p,n) X::char_type* pre: p not in [s,s+n). yields: s. for each i in [0,n), performs X::assign(s[i],p[i]). linear
X::assign(r,d) (not used) assigns r=d. constant
X::assign(s,n,c) X::char_type* for each i in [0,n), performs X::assign(s[i],c). yields: s. linear
X::not_eof(e) int_type yields: e if X::eq_int_type(e,X::eof()) is false, otherwise a value f such that X::eq_int_type(f,X::eof()) is false. constant
X::to_char_type(e) X::char_type yields: if for some c, X::eq_int_type(e,X::to_int_type(c)) is true, c; else some unspecified value. constant
X::to_int_type(c) X::int_type yields: some value e, constrained by the definitions of to_char_type and eq_int_type. constant
X::eq_int_type(e,f) bool yields: for all c and d, X::eq(c,d) is equal to X::eq_int_type(X::to_int_type(c), X::to_int_type(d)); otherwise, yields true if e and f are both copies of X::eof(); otherwise, yields false if one of e and f is a copy of X::eof() and the other is not; otherwise the value is unspecified. constant
X::eof() X::int_type yields: a value e such that X::eq_int_type(e,X::to_int_type(c)) is false for all values c. constant

21.4.2 basic_string constructors and assignment operators [string.cons]

Table 63basic_string(const Allocator&) effects
ElementValue
data() a non-null pointer that is copyable and can have 0 added to it
size() 0
capacity() an unspecified value

21.4.2 basic_string constructors and assignment operators [string.cons]

Table 64basic_string(const basic_string&) effects
ElementValue
data() points at the first element of an allocated copy of the array whose first element is pointed at by str.data()
size() str.size()
capacity() a value at least as large as size()

21.4.2 basic_string constructors and assignment operators [string.cons]

Table 65basic_string(const basic_string&, size_type, size_type, const Allocator&) effects
ElementValue
data() points at the first element of an allocated copy of rlen consecutive elements of the string controlled by str beginning at position pos
size() rlen
capacity() a value at least as large as size()

21.4.2 basic_string constructors and assignment operators [string.cons]

Table 66basic_string(const charT*, size_type, const Allocator&) effects
ElementValue
data() points at the first element of an allocated copy of the array whose first element is pointed at by s
size() n
capacity() a value at least as large as size()

21.4.2 basic_string constructors and assignment operators [string.cons]

Table 67basic_string(const charT*, const Allocator&) effects
ElementValue
data() points at the first element of an allocated copy of the array whose first element is pointed at by s
size() traits::length(s)
capacity() a value at least as large as size()

21.4.2 basic_string constructors and assignment operators [string.cons]

Table 68basic_string(size_t, charT, const Allocator&) effects
ElementValue
data() points at the first element of an allocated array of n elements, each storing the initial value c
size() n
capacity() a value at least as large as size()

21.4.2 basic_string constructors and assignment operators [string.cons]

Table 69basic_string(const basic_string&, const Allocator&) and basic_string(basic_string&&, const Allocator&) effects
ElementValue
data() points at the first element of an allocated copy of the array whose first element is pointed at by the original value of str.data().
size() the original value of str.size()
capacity() a value at least as large as size()
get_allocator() alloc

21.4.2 basic_string constructors and assignment operators [string.cons]

Table 70operator=(const basic_string<charT, traits, Allocator>&) effects
ElementValue
data() points at the first element of an allocated copy of the array whose first element is pointed at by str.data()
size() str.size()
capacity() a value at least as large as size()

21.4.2 basic_string constructors and assignment operators [string.cons]

Table 71operator=(const basic_string<charT, traits, Allocator>&&) effects
ElementValue
data() points at the array whose first element was pointed at by str.data()
size() previous value of str.size()
capacity() a value at least as large as size()

21.4.7.9 basic_string::compare [string::compare]

Table 72compare() results
ConditionReturn Value
size() < str.size() < 0
size() == str.size() 0
size() > str.size() > 0

21.7 Null-terminated sequence utilities [c.strings]

Table 73 — Potential mbstate_t data races
mbrlen mbrtowc mbsrtowc mbtowc wcrtomb
wcsrtomb wctomb

21.7 Null-terminated sequence utilities [c.strings]

Table 74 — Header <cctype> synopsis
TypeName(s)
Functions:
isalnum isblank isdigit isprint isupper
tolower isalpha isgraph ispunct isxdigit
toupper iscntrl islower isspace

21.7 Null-terminated sequence utilities [c.strings]

Table 75 — Header <cwctype> synopsis
TypeName(s)
Macro: WEOF
Types: wctrans_t wctype_t wint_t
Functions:
iswalnum iswctype iswprint iswxdigit wctrans
iswalpha iswdigit iswpunct towctrans wctype
iswblank iswgraph iswspace towlower
iswcntrl iswlower iswupper towupper

21.7 Null-terminated sequence utilities [c.strings]

Table 76 — Header <cstring> synopsis
TypeName(s)
Macro: NULL <cstring>
Type: size_t <cstring>
Functions:
memchr strcat strcspn strncpy strtok
memcmp strchr strerror strpbrk strxfrm
memcpy strcmp strlen strrchr
memmove strcoll strncat strspn
memset strcpy strncmp strstr

21.7 Null-terminated sequence utilities [c.strings]

Table 77 — Header <cwchar> synopsis
TypeName(s)
Macros: NULL WCHAR_MAX WCHAR_MIN WEOF
Types: mbstate_t wint_t size_t tm
Functions:
btowc mbsinit vwscanf wcsncpy wcstoull
fgetwc mbsrtowcs wcrtomb wcspbrk wcstoul
fgetws putwchar wcscat wcsrchr wcsxfrm
fputwc putwc wcschr wcsrtombs wctob
fputws swprintf wcscmp wcsspn wmemchr
fwide swscanf wcscoll wcsstr wmemcmp
fwprintf ungetwc wcscpy wcstod wmemcpy
fwscanf vfwprintf wcscspn wcstof wmemmove
getwchar vfwscanf wcsftime wcstok wmemset
getwc vswprintf wcslen wcstold wprintf
mbrlen vswscanf wcsncat wcstoll wscanf
mbrtowc vwprintf wcsncmp wcstol

21.7 Null-terminated sequence utilities [c.strings]

Table 78 — Header <cstdlib> synopsis
TypeName(s)
Macros: MB_CUR_MAX
Functions:
atof mblen strtof strtoul
atoi mbtowc strtol strtoull
atol mbstowcs strtold wctomb
atoll strtod strtoll wcstombs

21.7 Null-terminated sequence utilities [c.strings]

Table 79 — Header <cuchar> synopsis
TypeName(s)
Macros: __STDC_UTF_16__
__STDC_UTF_32__
Functions: mbrtoc16 c16rtomb
mbrtoc32 c32rtomb

22.1 General [localization.general]

Table 80 — Localization library summary
Subclause Header(s)
[locales] Locales <locale>
[locale.categories] Standard locale Categories
[locale.stdcvt] Standard code conversion facets <codecvt>
[c.locales] C library locales <clocale>

22.3.1.1.1 Type locale::category [locale.category]

Table 81 — Locale category facets
CategoryIncludes facets
collate collate<char>, collate<wchar_t>
ctype ctype<char>, ctype<wchar_t>
codecvt<char,char,mbstate_t>
codecvt<char16_t,char,mbstate_t>
codecvt<char32_t,char,mbstate_t>
codecvt<wchar_t,char,mbstate_t>
monetary moneypunct<char>, moneypunct<wchar_t>
moneypunct<char,true>, moneypunct<wchar_t,true>
money_get<char>, money_get<wchar_t>
money_put<char>, money_put<wchar_t>
numeric numpunct<char>, numpunct<wchar_t>
num_get<char>, num_get<wchar_t>
num_put<char>, num_put<wchar_t>
time time_get<char>, time_get<wchar_t>
time_put<char>, time_put<wchar_t>
messages messages<char>, messages<wchar_t>

22.3.1.1.1 Type locale::category [locale.category]

Table 82 — Required specializations
CategoryIncludes facets
collate collate_byname<char>, collate_byname<wchar_t>
ctype ctype_byname<char>, ctype_byname<wchar_t>
codecvt_byname<char,char,mbstate_t>
codecvt_byname<char16_t,char,mbstate_t>
codecvt_byname<char32_t,char,mbstate_t>
codecvt_byname<wchar_t,char,mbstate_t>
monetary moneypunct_byname<char,International>
moneypunct_byname<wchar_t,International>
money_get<C,InputIterator>
money_put<C,OutputIterator>
numeric numpunct_byname<char>, numpunct_byname<wchar_t>
num_get<C,InputIterator>, num_put<C,OutputIterator>
time time_get<char,InputIterator>
time_get_byname<char,InputIterator>
time_get<wchar_t,InputIterator>
time_get_byname<wchar_t,InputIterator>
time_put<char,OutputIterator>
time_put_byname<char,OutputIterator>
time_put<wchar_t,OutputIterator>
time_put_byname<wchar_t,OutputIterator>
messages messages_byname<char>, messages_byname<wchar_t>

22.4.1.4.2 codecvt virtual functions [locale.codecvt.virtuals]

Table 83do_in/do_out result values
ValueMeaning
ok completed the conversion
partial not all source characters converted
error encountered a character in [from,from_end) that it could not convert
noconv internT and externT are the same type, and input sequence is identical to converted sequence

22.4.1.4.2 codecvt virtual functions [locale.codecvt.virtuals]

Table 84do_unshift result values
ValueMeaning
ok completed the sequence
partial space for more than to_end-to destination elements was needed to terminate a sequence given the value of state
error an unspecified error has occurred
noconv no termination is needed for this state_type

22.4.2.1.2 num_get virtual functions [facet.num.get.virtuals]

Table 85 — Integer conversions
State stdio equivalent
basefield == oct %o
basefield == hex %X
basefield == 0 %i
signed integral type %d
unsigned integral type %u

22.4.2.1.2 num_get virtual functions [facet.num.get.virtuals]

Table 86 — Length modifier
Type Length modifier
short h
unsigned short h
long l
unsigned long l
long long ll
unsigned long long ll
double l
long double L

22.4.2.2.2 num_put virtual functions [facet.num.put.virtuals]

Table 87 — Integer conversions
State stdio equivalent
basefield == ios_base::oct %o
(basefield == ios_base::hex) && !uppercase %x
(basefield == ios_base::hex) %X
for a signed integral type %d
for an unsigned integral type %u

22.4.2.2.2 num_put virtual functions [facet.num.put.virtuals]

Table 88 — Floating-point conversions
State stdio equivalent
floatfield == ios_base::fixed %f
floatfield == ios_base::scientific && !uppercase %e
floatfield == ios_base::scientific %E
floatfield == (ios_base::fixed | ios_base::scientific) && !uppercase %a
floatfield == (ios_base::fixed | ios_base::scientific) %A
!uppercase %g
otherwise %G

22.4.2.2.2 num_put virtual functions [facet.num.put.virtuals]

Table 89 — Length modifier
Type Length modifier
long l
long long ll
unsigned long l
unsigned long long ll
long double L
otherwise none

22.4.2.2.2 num_put virtual functions [facet.num.put.virtuals]

Table 90 — Numeric conversions
Type(s)State stdio equivalent
an integral type flags & showpos +
flags & showbase #
a floating-point type flags & showpos +
flags & showpoint #

22.4.2.2.2 num_put virtual functions [facet.num.put.virtuals]

Table 91 — Fill padding
StateLocation
adjustfield == ios_base::left pad after
adjustfield == ios_base::right pad before
adjustfield == internal and a sign occurs in the representation pad after the sign
adjustfield == internal and representation after stage 1 began with 0x or 0X pad after x or X
otherwise pad before

22.4.5.1.2 time_get virtual functions [locale.time.get.virtuals]

Table 92do_get_date effects
date_order()Format
no_order "%m%d%y"
dmy "%d%m%y"
mdy "%m%d%y"
ymd "%y%m%d"
ydm "%y%d%m"

22.6 C library locales [c.locales]

Table 93 — Header <clocale> synopsis
TypeName(s)
Macros: LC_ALL LC_COLLATE LC_CTYPE
LC_MONETARY LC_NUMERIC LC_TIME
NULL
Struct: lconv
Functions: localeconv setlocale

22.6 C library locales [c.locales]

Table 94 — Potential setlocale data races
fprintf isprint iswdigit localeconv tolower
fscanf ispunct iswgraph mblen toupper
isalnum isspace iswlower mbstowcs towlower
isalpha isupper iswprint mbtowc towupper
isblank iswalnum iswpunct setlocale wcscoll
iscntrl iswalpha iswspace strcoll wcstod
isdigit iswblank iswupper strerror wcstombs
isgraph iswcntrl iswxdigit strtod wcsxfrm
islower iswctype isxdigit strxfrm wctomb

23.1 General [containers.general]

Table 95 — Containers library summary
Subclause Header(s)
[container.requirements] Requirements
[sequences] Sequence containers <array>
<deque>
<forward_list>
<list>
<vector>
[associative] Associative containers <map>
<set>
[unord] Unordered associative containers <unordered_map>
<unordered_set>
[container.adaptors] Container adaptors <queue>
<stack>

23.2.1 General container requirements [container.requirements.general]

Table 96 — Container requirements
ExpressionReturn typeOperationalAssertion/noteComplexity
semanticspre-/post-condition
X::value_type T Requires: T is Destructible compile time
X::reference lvalue of T compile time
X::const_reference const lvalue of T compile time
X::iterator iterator type whose value type is T any iterator category that meets the forward iterator requirements. convertible to X::const_iterator. 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; post: u.empty() constant
X() post: X().empty() constant
X(a) Requires: T is CopyInsertable into X (see below).
post: a == X(a).
linear
X u(a)
X u = a;
Requires: T is CopyInsertable into X (see below).
post: u == a
linear
X u(rv)
X u = rv
post: u shall be 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 a shall be equal to the value that rv had before this assignment linear
(&a)->~X() void note: the destructor is applied to every element of a; all the memory 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
a == b convertible to bool == is an equivalence relation. distance(a.begin(), a.end()) == distance(b.begin(), b.end()) && equal(a.begin(), a.end(), b.begin()) Requires: T is EqualityComparable linear
a != b convertible to bool Equivalent to: !(a == b) linear
a.swap(b) void exchanges the contents of a and b (Note A)
swap(a, b) void a.swap(b) (Note A)
r = a X& post: 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

23.2.1 General container requirements [container.requirements.general]

Table 97 — Reversible container requirements
ExpressionReturn typeAssertion/noteComplexity
pre-/post-condition
X::reverse_iterator iterator type whose value type is T reverse_iterator<iterator> compile time
X::const_reverse_iterator iterator type whose value type is const 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

23.2.1 General container requirements [container.requirements.general]

Table 98 — Optional container operations
ExpressionReturn typeOperationalAssertion/noteComplexity
semanticspre-/post-condition
a < b convertible to bool lexicographical_compare( a.begin(), a.end(), b.begin(), b.end()) pre: < is defined for values of T. < is a total ordering relationship. linear
a > b convertible to bool b < a linear
a <= b convertible to bool !(a > b) linear
a >= b convertible to bool !(a < b) linear

23.2.1 General container requirements [container.requirements.general]

Table 99 — Allocator-aware container requirements
ExpressionReturn typeAssertion/noteComplexity
pre-/post-condition
allocator_type A Requires: allocator_type::value_type is the same as X::value_type. compile time
get_- allocator() A constant
X()
X u;
Requires: A is DefaultConstructible.
post: u.empty() returns true, u.get_allocator() == A()
constant
X(m) post: u.empty() returns true, constant
X u(m); u.get_allocator() == m
X(t, m)
X u(t, m);
Requires: T is CopyInsertable into X.
post: u == t, get_allocator() == m
linear
X(rv)
X u(rv)
Requires: move construction of A shall not exit via an exception.
post: u shall have the same elements as rv had before this construction; the value of get_allocator() shall be the same as the value of rv.get_allocator() before this construction.
constant
X(rv, m)
X u(rv, m);
Requires: T is MoveInsertable into X.
post: u shall have the same elements, or copies of the elements, that rv had before this construction, get_allocator() == m
constant if m == rv.get_allocator(), otherwise linear
a = t X& Requires: T is CopyInsertable into X and CopyAssignable.
post: a == t
linear
a = rv X& Requires: If allocator_-
traits<allocator_type>
::propagate_on_container_-
move_assignment::value is
false, T is MoveInsertable into X and MoveAssignable. All existing elements of a are either move assigned to or destroyed.
post: a shall be equal to the value that rv had before this assignment.
linear
a.swap(b) void exchanges the contents of a and b constant

23.2.3 Sequence containers [sequence.reqmts]

Table 100 — Sequence container requirements (in addition to container)
ExpressionReturn typeAssertion/note
pre-/post-condition
X(n, t)
X a(n, t)
Requires: T shall be CopyInsertable into X.
post: distance(begin(), end()) == n
Constructs a sequence container with n copies of t
X(i, j)
X a(i, j)
Requires: T shall be EmplaceConstructible into X from *i. For vector, if the iterator does not meet the forward iterator requirements ([forward.iterators]), T shall also be MoveInsertable into X. Each iterator in the range [i,j) shall be dereferenced exactly once.
post: distance(begin(), end()) == distance(i, j)
Constructs a sequence container equal to the range [i, j)
X(il); Equivalent to X(il.begin(), il.end())
a = il; X& Requires: T is CopyInsertable into X and CopyAssignable. Assigns the range [il.begin(),il.end()) into a. All existing elements of a are either assigned to or destroyed.
Returns: *this.
a.emplace(p, args); iterator Requires: T is EmplaceConstructible into X from args. For vector and deque, T is also MoveInsertable into X and MoveAssignable. Effects: Inserts an object of type T constructed with std::forward<Args>(args)... before p.
a.insert(p,t) iterator Requires: T shall be CopyInsertable into X. For vector and deque, T shall also be CopyAssignable.
Effects: Inserts a copy of t before p.
a.insert(p,rv) iterator Requires: T shall be MoveInsertable into X. For vector and deque, T shall also be MoveAssignable.
Effects: Inserts a copy of rv before p.
a.insert(p,n,t) iterator Requires: T shall be CopyInsertable into X and CopyAssignable.
Inserts n copies of t before p.
a.insert(p,i,j) iterator Requires: T shall be EmplaceConstructible into X from *i. For vector, if the iterator does not meet the forward iterator requirements ([forward.iterators]), T shall also be MoveInsertable into X and MoveAssignable. Each iterator in the range [i,j) shall be dereferenced exactly once.
pre: i and j are not iterators into a.
Inserts copies of elements in [i, j) before p
a.insert(p, il); iterator a.insert(p, il.begin(), il.end()).
a.erase(q) iterator Requires: For vector and deque, T shall be MoveAssignable.
Effects: Erases the element pointed to by q
a.erase(q1,q2) iterator Requires: For vector and deque, T shall be MoveAssignable.
Effects: Erases the elements in the range [q1, q2).
a.clear() void Destroys all elements in a. Invalidates all references, pointers, and iterators referring to the elements of a and may invalidate the past-the-end iterator.
post: a.empty() returns true
a.assign(i,j) void Requires: T shall be EmplaceConstructible into X from *i and assignable from *i. For vector, if the iterator does not meet the forward iterator requirements ([forward.iterators]), T shall also be MoveInsertable into X.
Each iterator in the range [i,j) shall be dereferenced exactly once.
pre: i, j are not iterators into a.
Replaces elements in a with a copy of [i, j).
a.assign(il) void a.assign(il.begin(), il.end()).
a.assign(n,t) void Requires: T shall be CopyInsertable into X and CopyAssignable.
pre: t is not a reference into a.
Replaces elements in a with n copies of t.

23.2.3 Sequence containers [sequence.reqmts]

Table 101 — Optional sequence container operations
ExpressionReturn typeOperational semanticsContainer
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) void Prepends an object of type T constructed with std::forward<Args>(args)....
Requires: T shall be EmplaceConstructible into X from args.
deque, forward_list, list
a.emplace_- back(args) void Appends an object of type T constructed with std::forward<Args>(args)....
Requires: T shall be EmplaceConstructible into X from args. For vector, T shall also be MoveInsertable into X.
deque, list, vector
a.push_front(t) void Prepends a copy of t.
Requires: T shall be CopyInsertable into X.
deque, forward_list, list
a.push_front(rv) void Prepends a copy of rv.
Requires: T shall be MoveInsertable into X.
deque, forward_list, list
a.push_back(t) void Appends a copy of t.
Requires: T shall be CopyInsertable into X.
basic_string, deque, list, vector
a.push_back(rv) void Appends a copy of rv.
Requires: T shall be MoveInsertable into X.
basic_string, deque, list, vector
a.pop_front() void Destroys the first element.
Requires: a.empty() shall be false.
deque, forward_list, list
a.pop_back() void Destroys the last element.
Requires: a.empty() shall be false.
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

23.2.4 Associative containers [associative.reqmts]

Table 102 — Associative container requirements (in addition to container)
ExpressionReturn typeAssertion/noteComplexity
pre-/post-condition
X::key_type Key Requires: Key is Destructible. compile time
mapped_type (map and multimap only) T Requires: T is Destructible. compile time
X::key_compare Compare defaults to less<key_type> compile time
X::value_compare 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
X(c)
X a(c);
Requires: key_compare is CopyConstructible.
Effects: Constructs an empty container. Uses a copy of c as a comparison object.
constant
X()
X a;
Requires: key_compare is DefaultConstructible.
Effects: Constructs an empty container. Uses Compare() as a comparison object
constant
X(i,j,c)
X a(i,j,c);
Requires: key_compare is CopyConstructible. value_type is EmplaceConstructible into X from *i.
Effects: Constructs an empty container and inserts elements from the range [i, j) into it; uses c as a comparison object.
N log N in general (N has the value distance(i, j)); linear if [i, j) is sorted with value_comp()
X(i,j) X a(i,j); Requires: key_compare is DefaultConstructible. value_type is EmplaceConstructible into X from *i.
Effects: Same as above, but uses Compare() as a comparison object
same as above
X(il); Same as X(il.begin(), il.end()). same as X(il.begin(), il.end()).
a = il X& Requires: value_type is CopyInsertable into X and CopyAssignable.
Effects: Assigns the range [il.begin(),il.end()) into a. All existing elements of a are either assigned to or destroyed.
N log N in general (where N has the value il.size() + a.size()); linear if [il.begin(),il.end()) is sorted with value_comp().
a.key_comp() X::key_compare returns the comparison object out of which a was constructed. constant
a.value_comp() X::value_compare returns an object of value_compare constructed out of the comparison object constant
a_uniq. emplace(args) pair<iterator, bool> Requires: value_type shall be EmplaceConstructible into X from args.
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 Requires: value_type shall be EmplaceConstructible into X from args.
Effects: Inserts a value_type object t constructed with std::forward<Args>(args)... and returns the iterator pointing to the newly inserted element. If a range containing elements equivalent to t exists in a_eq, t is inserted at the end of that range.
logarithmic
a.emplace_hint(p, args) iterator equivalent to a.emplace( std::forward<Args>(args)...). Return value is an iterator pointing to the element with the key equivalent to the newly inserted element. 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
a_uniq. insert(t) pair<iterator, bool> Requires: If t is a non-const rvalue expression, value_type shall be MoveInsertable into X; otherwise, value_type shall be CopyInsertable 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 Requires: If t is a non-const rvalue expression, value_type shall be MoveInsertable into X; otherwise, value_type shall be CopyInsertable into X.
Effects: Inserts t and returns the iterator pointing to the newly inserted element. If a range containing elements equivalent to t exists in a_eq, t is inserted at the end of that range.
logarithmic
a.insert(
p, t)
iterator Requires: If t is a non-const rvalue expression, value_type shall be MoveInsertable into X; otherwise, value_type shall be CopyInsertable 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. t is inserted as close as possible to the position just prior to p.
logarithmic in general, but amortized constant if t is inserted right before p.
a.insert(
i, j)
void Requires: value_type shall be EmplaceConstructible into X from *i.
pre: i, j are not iterators into a. 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.
Nlog (a.size() + N) (N has the value distance(i, j)
a.insert(il) void Equivalent to a.insert(il.begin(), il.end()).
a.erase(k) size_type erases all elements in the container with key equivalent to k. returns the number of erased elements. log (a.size()) + a.count(k)
a.erase(q) iterator erases the element pointed to by q. Returns an iterator pointing to the element immediately following q prior to the element being erased. If no such element exists, returns a.end(). amortized constant
a.erase(
q1, q2)
iterator erases all the elements in the range [q1,q2). Returns q2. log (a.size()) + N where N has the value distance(q1, q2).
a.clear() void a.erase(a.begin(),a.end())
post: a.empty() returns true
linear in a.size().
a.find(k) iterator; const_iterator for constant a. returns an iterator pointing to an element with the key equivalent to k, or a.end() if such an element is not found logarithmic
a.count(k) size_type returns the number of elements with key equivalent to k log (a.size()) + a.count(k)
a.lower_bound(k) iterator; const_iterator for constant a. returns an iterator pointing to the first element with key not less than k, or a.end() if such an element is not found. logarithmic
a.upper_bound(k) iterator; const_iterator for constant a. returns an iterator pointing to the first element with key greater than k, or a.end() if such an element is not found. logarithmic
a.equal_range(k) pair<iterator, iterator>; pair<const_iterator, const_iterator> for constant a. equivalent to make_pair(a.lower_bound(k), a.upper_bound(k)). logarithmic

23.2.5 Unordered associative containers [unord.req]

Table 103 — Unordered associative container requirements (in addition to container)
ExpressionReturn typeAssertion/note pre-/post-conditionComplexity
X::key_type Key Requires: Key shall be Destructible. compile time
X::mapped_type (unordered_map and unordered_multimap only) T Requires: T is Destructible. compile time
X::hasher Hash Hash shall be a unary function object type such that the expression hf(k) has type std::size_t. compile time
X::key_equal Pred Pred shall be a binary predicate that takes two arguments of type Key. Pred is an equivalence relation. compile time
X::local_iterator 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
X::const_local_iterator 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
X(n, hf, eq)
X a(n, hf, eq)
X Requires: hasher and key_equal are CopyConstructible.
Effects: Constructs an empty container with at least n buckets, using hf as the hash function and eq as the key equality predicate.
Ο(n)
X(n, hf)
X a(n, hf)
X Requires: hasher is CopyConstructible and key_equal is DefaultConstructible.
Effects: Constructs an empty container with at least n buckets, using hf as the hash function and key_equal() as the key equality predicate.
Ο(n)
X(n)
X a(n)
X Requires: hasher and key_equal are DefaultConstructible.
Effects: Constructs an empty container with at least n buckets, using hasher() as the hash function and key_equal() as the key equality predicate.
Ο(n)
X()
X a
X Requires: hasher and key_equal are DefaultConstructible.
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.
constant
X(i, j, n, hf, eq)
X a(i, j, n, hf, eq)
X Requires: hasher and key_equal are CopyConstructible. value_type is EmplaceConstructible into X from *i.
Effects: Constructs an empty container with at least n buckets, using hf as the hash function and eq as the key equality predicate, and inserts elements from [i, j) into it.
Average case Ο(N) (N is distance(i, j)), worst case Ο(N2)
X(i, j, n, hf)
X a(i, j, n, hf)
X Requires: hasher is CopyConstructible and key_equal is DefaultConstructible. value_type is EmplaceConstructible into X from *i.
Effects: Constructs an empty container with at least n buckets, using hf as the hash function and key_equal() as the key equality predicate, and inserts elements from [i, j) into it.
Average case Ο(N) (N is distance(i, j)), worst case Ο(N2)
X(i, j, n)
X a(i, j, n)
X Requires: hasher and key_equal are DefaultConstructible. value_type is EmplaceConstructible into X from *i.
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) (N is distance(i, j)), worst case Ο(N2)
X(i, j)
X a(i, j)
X Requires: hasher and key_equal are DefaultConstructible. value_type is EmplaceConstructible into X from *i.
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) (N is distance(i, j)), worst case Ο(N2)
X(il) X Same as X(il.begin(), il.end()). Same as X(il.begin(), il.end()).
X(b)
X a(b)
X Copy constructor. In addition to the requirements of Table [tab:containers.container.requirements], copies the hash function, predicate, and maximum load factor. Average case linear in b.size(), worst case quadratic.
a = b X& Copy assignment operator. In addition to the requirements of Table [tab:containers.container.requirements], copies the hash function, predicate, and maximum load factor. Average case linear in b.size(), worst case quadratic.
a = il X& Requires: value_type is CopyInsertable into X and CopyAssignable.
Effects: Assigns the range [il.begin(),il.end()) into a. All existing elements of a are either assigned to or destroyed.
Same as a = X(il).
b.hash_function() hasher Returns b's hash function. constant
b.key_eq() key_equal Returns b's key equality predicate. constant
a_uniq. emplace(args) pair<iterator, bool> Requires: value_type shall be EmplaceConstructible into X from args.
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.
Average case Ο(1), worst case Ο(a_uniq.
size()
)
.
a_eq.emplace(args) iterator Requires: value_type shall be EmplaceConstructible into X from args.
Effects: Inserts a value_type object t constructed with std::forward<Args>(args)... and returns the iterator pointing to the newly inserted element.
Average case Ο(1), worst case Ο(a_eq.
size()
)
.
a.emplace_hint(p, args) iterator Requires: value_type shall be EmplaceConstructible into X from args.
Effects: Equivalent to a.emplace( std::forward<Args>(args)...). Return value is an iterator pointing to the element with the key equivalent to the newly inserted element. The const_iterator p is a hint pointing to where the search should start. Implementations are permitted to ignore the hint.
Average case Ο(1), worst case Ο(a. size()).
a_uniq.insert(t) pair<iterator, bool> Requires: If t is a non-const rvalue expression, value_type shall be MoveInsertable into X; otherwise, value_type shall be CopyInsertable 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.
Average case Ο(1), worst case Ο(a_uniq.
size()
)
.
a_eq.insert(t) iterator Requires: If t is a non-const rvalue expression, value_type shall be MoveInsertable into X; otherwise, value_type shall be CopyInsertable into X.
Effects: Inserts t, and returns an iterator pointing to the newly inserted element.
Average case Ο(1), worst case Ο(a_eq.
size()
)
.
a.insert(q, t) iterator Requires: If t is a non-const rvalue expression, value_type shall be MoveInsertable into X; otherwise, value_type shall be CopyInsertable into X.
Effects: Equivalent to a.insert(t). Return value is an iterator pointing to the element with the key equivalent to that of t. The iterator q is a hint pointing to where the search should start. Implementations are permitted to ignore the hint.
Average case Ο(1), worst case Ο(a.size()).
a.insert(i, j) void Requires: value_type shall be EmplaceConstructible into X from *i.
Pre: i and j are not iterators in a. Equivalent to a.insert(t) for each element in [i,j).
Average case Ο(N), where N is distance(i, j). Worst case Ο(N * (a.size())
+ N
)
.
a.insert(il) void Same as a.insert(il.begin(), il.end()). Same as a.insert( il.begin(), il.end()).
a.erase(k) size_type Erases all elements with key equivalent to k. Returns the number of elements erased. Average case Ο(a.count(k)). Worst case Ο(a.size()).
a.erase(q) iterator Erases the element pointed to by q. Return value is the iterator immediately following q prior to the erasure. Average case Ο(1), worst case Ο(a.size()).
a.erase(q1, q2) iterator Erases all elements in the range [q1, q2). Return value is the iterator immediately following the erased elements prior to the erasure. Average case linear in distance(q1, q2), worst case Ο(a.size()).
a.clear() void Erases all elements in the container. Post: a.empty() returns true Linear.
b.find(k) iterator;
const_iterator for const b.
Returns an iterator pointing to an element with key equivalent to k, or b.end() if no such element exists. Average case Ο(1), worst case Ο(b.size()).
b.count(k) size_type Returns the number of elements with key equivalent to k. Average case Ο(1), worst case Ο(b.size()).
b.equal_range(k) pair<iterator, iterator>;
pair<const_iterator, const_iterator> for const b.
Returns a range containing all elements with keys equivalent to k. Returns make_pair(b.end(), b.end()) if no such elements exist. Average case Ο(b.count(k)). Worst case Ο(b.size()).
b.bucket_count() size_type Returns the number of buckets that b contains. Constant
b.max_bucket_count() size_type Returns an upper bound on the number of buckets that b might ever contain. Constant
b.bucket(k) size_type Pre: b.bucket_count() > 0.
Returns the index of the bucket in which elements with keys equivalent to k would be found, if any such element existed. Post: the return value shall be in the range [0, b.bucket_count()).
Constant
b.bucket_size(n) size_type Pre: n shall be in the range [0, b.bucket_count()). Returns the number of elements in the n th bucket. Ο(b.bucket_size(n))
b.begin(n) local_iterator;
const_local_iterator for const b.
Pre: n shall be in the range [0, b.bucket_count()). b.begin(n) returns an iterator referring to the first element in the bucket. If the bucket is empty, then b.begin(n) == b.end(n). Constant
b.end(n) local_iterator;
const_local_iterator for const b.
Pre: n shall be in the range [0, b.bucket_count()). b.end(n) returns an iterator which is the past-the-end value for the bucket. Constant
b.cbegin(n) const_local_iterator Pre: n shall be in the range [0, b.bucket_count()). Note: [b.cbegin(n), b.cend(n)) is a valid range containing all of the elements in the n th bucket. Constant
b.cend(n) const_local_iterator Pre: n shall be in the range [0, b.bucket_count()). Constant
b.load_factor() float Returns the average number of elements per bucket. Constant
b.max_load_factor() float Returns a positive number that the container attempts to keep the load factor less than or equal to. The container automatically increases the number of buckets as necessary to keep the load factor below this number. Constant
a.max_load_factor(z) void Pre: z shall be positive. May change the container's maximum load load factor, using z as a hint. Constant
a.rehash(n) void Post: a.bucket_count() > a.size() / a.max_load_factor() and a.bucket_count() >= n. Average case linear in a.size(), worst case quadratic.
a.reserve(n) void Same as a.rehash(ceil(n / a.max_load_factor())). Average case linear in a.size(), worst case quadratic.

24.1 General [iterators.general]

Table 104 — Iterators library summary
Subclause Header(s)
[iterator.requirements] Requirements
[iterator.primitives] Iterator primitives <iterator>
[predef.iterators] Predefined iterators
[stream.iterators] Stream iterators

24.2.1 In general [iterator.requirements.general]

Table 105 — Relations among iterator categories
Random Access Bidirectional Forward Input
Output

24.2.2 Iterator [iterator.iterators]

Table 106 — Iterator requirements
ExpressionReturn typeOperationalAssertion/note
semanticspre-/post-condition
*r reference pre: r is dereferenceable.
++r X&

24.2.3 Input iterators [input.iterators]

Table 107 — Input iterator requirements (in addition to Iterator)
ExpressionReturn typeOperationalAssertion/note
semanticspre-/post-condition
a != b contextually convertible to bool !(a == b) pre: (a, b) is in the domain of ==.
*a convertible to T pre: a is dereferenceable.
The expression
(void)*a, *a is equivalent to *a.
If a == b and (a,b) is in the domain of == then *a is equivalent to *b.
a->m (*a).m pre: a is dereferenceable.
++r X& pre: r is dereferenceable.
post: r is dereferenceable or r is past-the-end.
post: any copies of the previous value of r are no longer required either to be dereferenceable or to be in the domain of ==.
(void)r++ equivalent to (void)++r
*r++ convertible to T { T tmp = *r;
++r;
return tmp; }

24.2.4 Output iterators [output.iterators]

Table 108 — Output iterator requirements (in addition to Iterator)
ExpressionReturn typeOperationalAssertion/note
semanticspre-/post-condition
*r = o result is not used Remark: After this operation r is not required to be dereferenceable.
post: r is incrementable.
++r X& &r == &++r.
Remark: After this operation r is not required to be dereferenceable.
post: r is incrementable.
r++ convertible to const X& { X tmp = r;
++r;
return tmp; }
Remark: After this operation r is not required to be dereferenceable.
post: r is incrementable.
*r++ = o result is not used Remark: After this operation r is not required to be dereferenceable.
post: r is incrementable.

24.2.5 Forward iterators [forward.iterators]

Table 109 — Forward iterator requirements (in addition to input iterator)
ExpressionReturn typeOperationalAssertion/note
semanticspre-/post-condition
r++ convertible to const X& { X tmp = r;
++r;
return tmp; }
*r++ reference

24.2.6 Bidirectional iterators [bidirectional.iterators]

Table 110 — Bidirectional iterator requirements (in addition to forward iterator)
ExpressionReturn typeOperationalAssertion/note
semanticspre-/post-condition
-- r X& pre: there exists s such that r == ++s.
post: r is dereferenceable.
--(++r) == r.
-- r == -- s implies r == s.
&r == &-- r.
r-- convertible to const X& { X tmp = r;
-- r;
return tmp; }
*r-- reference

24.2.7 Random access iterators [random.access.iterators]

Table 111 — Random access iterator requirements (in addition to bidirectional iterator)
ExpressionReturn typeOperationalAssertion/note
semanticspre-/post-condition
r += n X& { difference_type m = n;
if (m >= 0)
while (m--)
++r;
else
while (m++)
-- r;
return r; }
a + n
n + a
X { X tmp = a;
return tmp += n; }
a + n == n + a.
r -= n X& return r += -n;
a - n X { X tmp = a;
return tmp -= n; }
b - a difference_type return n pre: there exists a value n of type difference_type such that a + n == b.
b == a + (b - a).
a[n] convertible to reference *(a + n)
a < b contextually convertible to bool b - a > 0 < is a total ordering relation
a > b contextually convertible to bool b < a > is a total ordering relation opposite to <.
a >= b contextually convertible to bool !(a < b)
a <= b contextually convertible to bool. !(a > b)

25.1 General [algorithms.general]

Table 112 — Algorithms library summary
Subclause Header(s)
[alg.nonmodifying] Non-modifying sequence operations
[alg.modifying.operations] Mutating sequence operations <algorithm>
[alg.sorting] Sorting and related operations
[alg.c.library] C library algorithms <cstdlib>

25.5 C library algorithms [alg.c.library]

Table 113 — Header <cstdlib> synopsis
TypeName(s)
Type: size_t
Functions: bsearch qsort

26.1 General [numerics.general]

Table 114 — Numerics library summary
Subclause Header(s)
[numeric.requirements] Requirements
[cfenv] Floating-Point Environment <cfenv>
[complex.numbers] Complex Numbers <complex>
[rand] Random number generation <random>
[numarray] Numeric arrays <valarray>
[numeric.ops] Generalized numeric operations <numeric>
[c.math] C library <cmath>
<ctgmath>
<tgmath.h>
<cstdlib>

26.5.1.2 Seed sequence requirements [rand.req.seedseq]

Table 115 — Seed sequence requirements
ExpressionReturn typePre/post-conditionComplexity
S::result_type T T is an unsigned integer type ([basic.fundamental]) of at least 32 bits. compile-time
S() Creates a seed sequence with the same initial state as all other default-constructed seed sequences of type S. constant
S(ib,ie) Creates a seed sequence having internal state that depends on some or all of the bits of the supplied sequence [ib,ie). Ο(ie - ib)
S(il) Same as S(il.begin(), il.end()). same as S(il.begin(), il.end())
q.generate(rb,re) void Does nothing if rb == re. Otherwise, fills the supplied sequence [rb,re) with 32-bit quantities that depend on the sequence supplied to the constructor and possibly also depend on the history of generate's previous invocations. Ο(re - rb)
r.size() size_t The number of 32-bit units that would be copied by a call to r.param. constant
r.param(ob) void Copies to the given destination a sequence of 32-bit units that can be provided to the constructor of a second object of type S, and that would reproduce in that second object a state indistinguishable from the state of the first object. Ο(r.size())

26.5.1.3 Uniform random number generator requirements [rand.req.urng]

Table 116 — Uniform random number generator requirements
ExpressionReturn typePre/post-conditionComplexity
G::result_type T T is an unsigned integer type ([basic.fundamental]). compile-time
g() T Returns a value in the closed interval [G::min(), G::max()]. amortized constant
G::min() T Denotes the least value potentially returned by operator(). compile-time
G::max() T Denotes the greatest value potentially returned by operator(). compile-time

26.5.1.4 Random number engine requirements [rand.req.eng]

Table 117 — Random number engine requirements
ExpressionReturn typePre/post-conditionComplexity
E() Creates an engine with the same initial state as all other default-constructed engines of type E. Ο(size of state)
E(x) Creates an engine that compares equal to x. Ο(size of state)
E(s) Creates an engine with initial state determined by s. Ο(size of state)
E(q)274 Creates an engine with an initial state that depends on a sequence produced by one call to q.generate. same as complexity of q.generate called on a sequence whose length is size of state
e.seed() void post: e == E(). same as E()
e.seed(s) void post: e == E(s). same as E(s)
e.seed(q) void post: e == E(q). same as E(q)
e() T Advances e's state ei to ei+1 = TA(ei) and returns GA(ei). per Table [tab:UniformRandomNumberGenerator]
e.discard(z) 275 void Advances e's state ei to ei+z by any means equivalent to z consecutive calls e(). no worse than the complexity of z consecutive calls e()
x == y bool This operator is an equivalence relation. With Sx and Sy as the infinite sequences of values that would be generated by repeated future calls to x() and y(), respectively, returns true if Sx = Sy ; else returns false. Ο(size of state)
x != y bool !(x == y). Ο(size of state)
os << x reference to the type of os With os.fmtflags set to ios_base::dec|ios_base::left and the fill character set to the space character, writes to os the textual representation of x's current state. In the output, adjacent numbers are separated by one or more space characters. post: The os.fmtflags and fill character are unchanged. Ο(size of state)
is >> v reference to the type of is With is.fmtflags set to ios_base::dec, sets v's state as determined by reading its textual representation from is. If bad input is encountered, ensures that v's state is unchanged by the operation and calls is.setstate(ios::failbit) (which may throw ios::failure [[iostate.flags]]). If a textual representation written via os << x was subsequently read via is >> v, then x == v provided that there have been no intervening invocations of x or of v. pre: is provides a textual representation that was previously written using an output stream whose imbued locale was the same as that of is, and whose type's template specialization arguments charT and traits were respectively the same as those of is. post: The is.fmtflags are unchanged. Ο(size of state)

26.5.1.6 Random number distribution requirements [rand.req.dist]

Table 118 — Random number distribution requirements
ExpressionReturn typePre/post-conditionComplexity
D::result_type T T is an arithmetic type ([basic.fundamental]). compile-time
D::param_type P compile-time
D() Creates a distribution whose behavior is indistinguishable from that of any other newly default-constructed distribution of type D. constant
D(p) Creates a distribution whose behavior is indistinguishable from that of a distribution newly constructed directly from the values used to construct p. same as p's construction
d.reset() void Subsequent uses of d do not depend on values produced by any engine prior to invoking reset. constant
x.param() P Returns a value p such that D(p).param() == p. no worse than the complexity of D(p)
d.param(p) void post: d.param() == p. no worse than the complexity of D(p)
d(g) T With p = d.param(), the sequence of numbers returned by successive invocations with the same object g is randomly distributed according to the associated p(z |{p}) or P(zi |{p}) function. amortized constant number of invocations of g
d(g,p) T The sequence of numbers returned by successive invocations with the same objects g and p is randomly distributed according to the associated p(z |{p}) or P(zi |{p}) function. amortized constant number of invocations of g
x.min() T Returns glb. constant
x.max() T Returns lub. constant
x == y bool This operator is an equivalence relation. Returns true if x.param() == y.param() and S1 = S2 , where S1 and S2 are the infinite sequences of values that would be generated, respectively, by repeated future calls to x(g1) and y(g2) whenever g1 == g2. Otherwise returns false. constant
x != y bool !(x == y). same as x == y.
os << x reference to the type of os Writes to os a textual representation for the parameters and the additional internal data of x. post: The os.fmtflags and fill character are unchanged.
is >> d reference to the type of is Restores from is the parameters and additional internal data of the lvalue d. If bad input is encountered, ensures that d is unchanged by the operation and calls is.setstate(ios::failbit) (which may throw ios::failure [[iostate.flags]]). pre: is provides a textual representation that was previously written using an os whose imbued locale and whose type's template specialization arguments charT and traits were the same as those of is. post: The is.fmtflags are unchanged.

26.8 C library [c.math]

Table 119 — Header <cmath> synopsis
TypeName(s)
Macros:
FP_FAST_FMA FP_ILOGBNAN FP_SUBNORMAL HUGE_VALL MATH_ERRNO
FP_FAST_FMAF FP_INFINITE FP_ZERO INFINITY MATH_ERREXCEPT
FP_FAST_FMAL FP_NAN HUGE_VAL NAN math_errhandling
FP_ILOGB0 FP_NORMAL HUGE_VALF
Types: double_tfloat_t
Math Functions:
abs cosh fmod logb remquo
acos erf frexp lrint rint
acosh erfc hypot lround round
asin exp2 ilogb modf scalbln
asinh exp ldexp nan scalbn
atan expm1 lgamma nanf sin
atan2 fabs llrint nanl sinh
atanh fdim llround nearbyint sqrt
cbrt floor log nextafter tan
ceil fma log10 nexttoward tanh
copysign fmax log1p pow tgamma
cos fmin log2 remainder trunc
Classification/comparison Functions:
fpclassify isgreaterequal islessequal isnan isunordered
isfinite isinf islessgreater isnormal signbit
isgreater isless

26.8 C library [c.math]

Table 120 — Header <cstdlib> synopsis
TypeName(s)
Macro: RAND_MAX
Types:
div_t ldiv_t lldiv_t
Functions:
abs ldiv rand
div llabs srand
labs lldiv

27.1 General [input.output.general]

Table 121 — Input/output library summary
Subclause Header(s)
[iostreams.requirements] Requirements
[iostream.forward] Forward declarations <iosfwd>
[iostream.objects] Standard iostream objects <iostream>
[iostreams.base] Iostreams base classes <ios>
[stream.buffers] Stream buffers <streambuf>
[iostream.format] Formatting and manipulators <istream>
<ostream>
<iomanip>
[string.streams] String streams <sstream>
[file.streams] File streams <fstream>
<cstdio>
<cinttypes>

27.5.3.1.2 Type ios_base::fmtflags [ios::fmtflags]

Table 122fmtflags effects
ElementEffect(s) if set
boolalpha insert and extract bool type in alphabetic format
dec converts integer input or generates integer output in decimal base
fixed generate floating-point output in fixed-point notation
hex converts integer input or generates integer output in hexadecimal base
internal adds fill characters at a designated internal point in certain generated output, or identical to right if no such point is designated
left adds fill characters on the right (final positions) of certain generated output
oct converts integer input or generates integer output in octal base
right adds fill characters on the left (initial positions) of certain generated output
scientific generates floating-point output in scientific notation
showbase generates a prefix indicating the numeric base of generated integer output
showpoint generates a decimal-point character unconditionally in generated floating-point output
showpos generates a + sign in non-negative generated numeric output
skipws skips leading whitespace before certain input operations
unitbuf flushes output after each output operation
uppercase replaces certain lowercase letters with their uppercase equivalents in generated output

27.5.3.1.2 Type ios_base::fmtflags [ios::fmtflags]

Table 123fmtflags constants
ConstantAllowable values
adjustfield left | right | internal
basefield dec | oct | hex
floatfield scientific | fixed

27.5.3.1.3 Type ios_base::iostate [ios::iostate]

Table 124iostate effects
ElementEffect(s) if set
badbit indicates a loss of integrity in an input or output sequence (such as an irrecoverable read error from a file);
eofbit indicates that an input operation reached the end of an input sequence;
failbit indicates that an input operation failed to read the expected characters, or that an output operation failed to generate the desired characters.

27.5.3.1.4 Type ios_base::openmode [ios::openmode]

Table 125openmode effects
ElementEffect(s) if set
app seek to end before each write
ate open and seek to end immediately after opening
binary perform input and output in binary mode (as opposed to text mode)
in open for input
out open for output
trunc truncate an existing stream when opening

27.5.3.1.5 Type ios_base::seekdir [ios::seekdir]

Table 126seekdir effects
ElementMeaning
beg request a seek (for subsequent input or output) relative to the beginning of the stream
cur request a seek relative to the current position within the sequence
end request a seek relative to the current end of the sequence

27.5.4.2 fpos requirements [fpos.operations]

Table 127 — Position type requirements
ExpressionReturn typeOperationalAssertion/note
semanticspre-/post-condition
P(i) p == P(i)
note: a destructor is assumed.
P p(i);
P p = i;
post: p == P(i).
P(o) fpos converts from offset
O(p) streamoff converts to offset P(O(p)) == p
p == q convertible to bool == is an equivalence relation
p != q convertible to bool !(p == q)
q = p + o
p += o
fpos + offset q - o == p
q = p - o
p -= o
fpos - offset q + o == p
o = p - q streamoff distance q + o == p
streamsize(o)
O(sz)
streamsize
streamoff
converts
converts
streamsize(O(sz)) == sz
streamsize(O(sz)) == sz

27.5.5.2 basic_ios constructors [basic.ios.cons]

Table 128basic_ios::init() effects
ElementValue
rdbuf() sb
tie() 0
rdstate() goodbit if sb is not a null pointer, otherwise badbit.
exceptions() goodbit
flags() skipws | dec
width() 0
precision() 6
fill() widen(' ');
getloc() a copy of the value returned by locale()
iarray a null pointer
parray a null pointer

27.5.5.3 Member functions [basic.ios.members]

Table 129basic_ios::copyfmt() effects
ElementValue
rdbuf() unchanged
tie() rhs.tie()
rdstate() unchanged
exceptions() rhs.exceptions()
flags() rhs.flags()
width() rhs.width()
precision() rhs.precision()
fill() rhs.fill()
getloc() rhs.getloc()

27.8.2.4 Overridden virtual functions [stringbuf.virtuals]

Table 130seekoff positioning
ConditionsResult
(which & ios_base::in) == ios_base::in positions the input sequence
(which & ios_base::out) == ios_base::out positions the output sequence
(which & (ios_base::in |
ios_base::out)) ==
(ios_base::in) |
ios_base::out))
and way == either
ios_base::beg or
ios_base::end
positions both the input and the output sequences
Otherwise the positioning operation fails.

27.8.2.4 Overridden virtual functions [stringbuf.virtuals]

Table 131newoff values
Conditionnewoff Value
way == ios_base::beg 0
way == ios_base::cur the next pointer minus the beginning pointer (xnext - xbeg).
way == ios_base::end the high mark pointer minus the beginning pointer (high_mark - xbeg).

27.9.1.4 Member functions [filebuf.members]

Table 132 — File open modes
ios_base flag combination stdio equivalent
binary in out trunc app
+ "w"
+ + "a"
+ "a"
+ + "w"
+ "r"
+ + "r+"
+ + + "w+"
+ + + "a+"
+ + "a+"
+ + "wb"
+ + + "ab"
+ + "ab"
+ + + "wb"
+ + "rb"
+ + + "r+b"
+ + + + "w+b"
+ + + + "a+b"
+ + + "a+b"

27.9.1.5 Overridden virtual functions [filebuf.virtuals]

Table 133seekoff effects
way Valuestdio Equivalent
basic_ios::beg SEEK_SET
basic_ios::cur SEEK_CUR
basic_ios::end SEEK_END

27.9.2 C library files [c.files]

Table 134 — Header <cstdio> synopsis
TypeName(s)
Macros:
BUFSIZ FOPEN_MAX SEEK_CUR TMP_MAX _IONBF stdout
EOF L_tmpnam SEEK_END _IOFBF stderr
FILENAME_MAX NULL <cstdio> SEEK_SET _IOLBF stdin
Types: FILE fpos_t size_t <cstdio>
Functions:
clearerr fopen fsetpos putc setbuf vprintf
fclose fprintf ftell putchar setvbuf vscanf
feof fputc fwrite puts snprintf vsnprintf
ferror fputs getc rename sprintf vsprintf
fflush fread getchar remove tmpfile vsscanf
fgetc freopen gets rewind tmpnam
fgetpos fscanf perror scanf ungetc
fgets fseek printf sscanf vfprintf

27.9.2 C library files [c.files]

Table 135 — Header <cinttypes> synopsis
TypeName(s)
Macros:
PRI{d i o u x X}[FAST LEAST]{8 16 32 64}
PRI{d i o u x X}{MAX PTR}
SCN{d i o u x X}[FAST LEAST]{8 16 32 64}
SCN{d i o u x X}{MAX PTR}
Types: imaxdiv_t
Functions:
abs imaxabs strtoimax wcstoimax
div imaxdiv strtoumax wcstoumax

28.1 General [re.general]

Table 136 — Regular expressions library summary
Subclause Header(s)
[re.def] Definitions
[re.req] Requirements
[re.const] Constants
[re.badexp] Exception type
[re.traits] Traits
[re.regex] Regular expression template <regex>
[re.submatch] Submatches
[re.results] Match results
[re.alg] Algorithms
[re.iter] Iterators
[re.grammar] Grammar

28.3 Requirements [re.req]

Table 137 — Regular expression traits class requirements
ExpressionReturn typeAssertion/note pre-/post-condition
X::char_type charT The character container type used in the implementation of class template basic_regex.
X::string_type std::basic_string<charT>
X::locale_type A copy constructible type A type that represents the locale used by the traits class.
X::char_class_type A bitmask type ([bitmask.types]). A bitmask type representing a particular character classification.
X::length(p) std::size_t Yields the smallest i such that p[i] == 0. Complexity is linear in i .
v.translate(c) X::char_type Returns a character such that for any character d that is to be considered equivalent to c then v.translate(c) == v.translate(d).
v.translate_nocase(c) X::char_type For all characters C that are to be considered equivalent to c when comparisons are to be performed without regard to case, then v.translate_nocase(c) == v.translate_nocase(C).
v.transform(F1, F2) X::string_type Returns a sort key for the character sequence designated by the iterator range [F1,F2) such that if the character sequence [G1,G2) sorts before the character sequence [H1,H2) then v.transform(G1, G2) < v.transform(H1, H2).
v.transform_primary(F1, F2) X::string_type Returns a sort key for the character sequence designated by the iterator range [F1,F2) such that if the character sequence [G1,G2) sorts before the character sequence [H1,H2) when character case is not considered then v.transform_primary(G1, G2) < v.transform_primary(H1, H2).
v.lookup_collatename(F1, F2) X::string_type Returns a sequence of characters that represents the collating element consisting of the character sequence designated by the iterator range [F1,F2). Returns an empty string if the character sequence is not a valid collating element.
v.lookup_classname(F1, F2, b) X::char_class_type Converts the character sequence designated by the iterator range [F1,F2) into a value of a bitmask type that can subsequently be passed to isctype. Values returned from lookup_classname can be bitwise or'ed together; the resulting value represents membership in either of the corresponding character classes. If b is true, the returned bitmask is suitable for matching characters without regard to their case. Returns 0 if the character sequence is not the name of a character class recognized by X. The value returned shall be independent of the case of the characters in the sequence.
v.isctype(c, cl) bool Returns true if character c is a member of one of the character classes designated by cl, false otherwise.
v.value(c, I) int Returns the value represented by the digit c in base I if the character c is a valid digit in base I; otherwise returns -1. [ Note: The value of I will only be 8, 10, or 16.  — end note ]
u.imbue(loc) X::locale_type Imbues u with the locale loc and returns the previous locale used by u if any.
v.getloc() X::locale_type Returns the current locale used by v, if any.

28.5.1 Bitmask type syntax_option_type [re.synopt]

Table 138syntax_option_type effects
ElementEffect(s) if set
icase Specifies that matching of regular expressions against a character container sequence shall be performed without regard to case.
nosubs Specifies that when a regular expression is matched against a character container sequence, no sub-expression matches shall be stored in the supplied match_results structure.
optimize Specifies that the regular expression engine should pay more attention to the speed with which regular expressions are matched, and less to the speed with which regular expression objects are constructed. Otherwise it has no detectable effect on the program output.
collate Specifies that character ranges of the form "[a-b]" shall be locale sensitive.
ECMAScript Specifies that the grammar recognized by the regular expression engine shall be that used by ECMAScript in ECMA-262, as modified in [re.grammar].
basic Specifies that the grammar recognized by the regular expression engine shall be that used by basic regular expressions in POSIX, Base Definitions and Headers, Section 9, Regular Expressions.
extended Specifies that the grammar recognized by the regular expression engine shall be that used by extended regular expressions in POSIX, Base Definitions and Headers, Section 9, Regular Expressions.
awk Specifies that the grammar recognized by the regular expression engine shall be that used by the utility awk in POSIX.
grep Specifies that the grammar recognized by the regular expression engine shall be that used by the utility grep in POSIX.
egrep Specifies that the grammar recognized by the regular expression engine shall be that used by the utility grep when given the -E option in POSIX.

28.5.2 Bitmask type regex_constants::match_flag_type [re.matchflag]

Table 139regex_constants::match_flag_type effects when obtaining a match against a character container sequence [first,last).
ElementEffect(s) if set
match_not_bol The first character in the sequence [first,last) shall be treated as though it is not at the beginning of a line, so the character ^ in the regular expression shall not match [first,first).
match_not_eol The last character in the sequence [first,last) shall be treated as though it is not at the end of a line, so the character "$" in the regular expression shall not match [last,last).
match_not_bow The expression "\b" shall not match the sub-sequence [first,first).
match_not_eow The expression "\b" shall not match the sub-sequence [last,last).
match_any If more than one match is possible then any match is an acceptable result.
match_not_null The expression shall not match an empty sequence.
match_continuous The expression shall only match a sub-sequence that begins at first.
match_prev_avail --first is a valid iterator position. When this flag is set the flags match_not_bol and match_not_bow shall be ignored by the regular expression algorithms [re.alg] and iterators [re.iter].
format_default When a regular expression match is to be replaced by a new string, the new string shall be constructed using the rules used by the ECMAScript replace function in ECMA-262, part 15.5.4.11 String.prototype.replace. In addition, during search and replace operations all non-overlapping occurrences of the regular expression shall be located and replaced, and sections of the input that did not match the expression shall be copied unchanged to the output string.
format_sed When a regular expression match is to be replaced by a new string, the new string shall be constructed using the rules used by the sed utility in POSIX.
format_no_copy During a search and replace operation, sections of the character container sequence being searched that do not match the regular expression shall not be copied to the output string.
format_first_only When specified during a search and replace operation, only the first occurrence of the regular expression shall be replaced.

28.5.3 Implementation-defined error_type [re.err]

Table 140error_type values in the C locale
ValueError condition
error_collate The expression contained an invalid collating element name.
error_ctype The expression contained an invalid character class name.
error_escape The expression contained an invalid escaped character, or a trailing escape.
error_backref The expression contained an invalid back reference.
error_brack The expression contained mismatched [ and ].
error_paren The expression contained mismatched ( and ).
error_brace The expression contained mismatched { and }
error_badbrace The expression contained an invalid range in a {} expression.
error_range The expression contained an invalid character range, such as [b-a] in most encodings.
error_space There was insufficient memory to convert the expression into a finite state machine.
error_badrepeat One of *?+{ was not preceded by a valid regular expression.
error_complexity The complexity of an attempted match against a regular expression exceeded a pre-set level.
error_stack There was insufficient memory to determine whether the regular expression could match the specified character sequence.

28.10.1 match_results constructors [re.results.const]

Table 141match_results assignment operator effects
ElementValue
ready() m.ready()
size() m.size()
str(n) m.str(n) for all integers n < m.size()
prefix() m.prefix()
suffix() m.suffix()
(*this)[n] m[n] for all integers n < m.size()
length(n) m.length(n) for all integers n < m.size()
position(n) m.position(n) for all integers n < m.size()

28.11.2 regex_match [re.alg.match]

Table 142 — Effects of regex_match algorithm
ElementValue
m.size() 1 + e.mark_count()
m.empty() false
m.prefix().first first
m.prefix().second first
m.prefix().matched false
m.suffix().first last
m.suffix().second last
m.suffix().matched false
m[0].first first
m[0].second last
m[0].matched true if a full match was found.
m[n].first For all integers n < m.size(), the start of the sequence that matched sub-expression n. Alternatively, if sub-expression n did not participate in the match, then last.
m[n].second For all integers n < m.size(), the end of the sequence that matched sub-expression n. Alternatively, if sub-expression n did not participate in the match, then last.
m[n].matched For all integers n < m.size(), true if sub-expression n participated in the match, false otherwise.

28.11.3 regex_search [re.alg.search]

Table 143 — Effects of regex_search algorithm
ElementValue
m.size() 1 + e.mark_count()
m.empty() false
m.prefix().first first
m.prefix().second m[0].first
m.prefix().matched m.prefix().first != m.prefix().second
m.suffix().first m[0].second
m.suffix().second last
m.suffix().matched m.suffix().first != m.suffix().second
m[0].first The start of the sequence of characters that matched the regular expression
m[0].second The end of the sequence of characters that matched the regular expression
m[0].matched true if a match was found, and false otherwise.
m[n].first For all integers n < m.size(), the start of the sequence that matched sub-expression n. Alternatively, if sub-expression n did not participate in the match, then last.
m[n].second For all integers n < m.size(), the end of the sequence that matched sub-expression n. Alternatively, if sub-expression n did not participate in the match, then last .
m[n].matched For all integers n < m.size(), true if sub-expression n participated in the match, false otherwise.

29.1 General [atomics.general]

Table 144 — Atomics library summary
Subclause Header(s)
[atomics.order] Order and Consistency
[atomics.lockfree] Lock-free Property
[atomics.types.generic] Atomic Types <atomic>
[atomics.types.operations] Operations on Atomic Types
[atomics.flag] Flag Type and Operations
[atomics.fences] Fences

29.5 Atomic types [atomics.types.generic]

Table 145atomic integral typedefs
Named type Integral argument type
atomic_char char
atomic_schar signed char
atomic_uchar unsigned char
atomic_short short
atomic_ushort unsigned short
atomic_int int
atomic_uint unsigned int
atomic_long long
atomic_ulong unsigned long
atomic_llong long long
atomic_ullong unsigned long long
atomic_char16_t char16_t
atomic_char32_t char32_t
atomic_wchar_t wchar_t

29.5 Atomic types [atomics.types.generic]

Table 146atomic <inttypes.h> typedefs
Atomic typedef <inttypes.h> type
atomic_int_least8_t int_least8_t
atomic_uint_least8_t uint_least8_t
atomic_int_least16_t int_least16_t
atomic_uint_least16_t uint_least16_t
atomic_int_least32_t int_least32_t
atomic_uint_least32_t uint_least32_t
atomic_int_least64_t int_least64_t
atomic_uint_least64_t uint_least64_t
atomic_int_fast8_t int_fast8_t
atomic_uint_fast8_t uint_fast8_t
atomic_int_fast16_t int_fast16_t
atomic_uint_fast16_t uint_fast16_t
atomic_int_fast32_t int_fast32_t
atomic_uint_fast32_t uint_fast32_t
atomic_int_fast64_t int_fast64_t
atomic_uint_fast64_t uint_fast64_t
atomic_intptr_t intptr_t
atomic_uintptr_t uintptr_t
atomic_size_t size_t
atomic_ptrdiff_t ptrdiff_t
atomic_intmax_t intmax_t
atomic_uintmax_t uintmax_t

29.6.5 Requirements for operations on atomic types [atomics.types.operations.req]

Table 147 — Atomic arithmetic computations
Key Op Computation Key Op Computation
add + addition sub - subtraction
or | bitwise inclusive or xor ^ bitwise exclusive or
and & bitwise and

30.1 General [thread.general]

Table 148 — Thread support library summary
Subclause Header(s)
[thread.req] Requirements
[thread.threads] Threads <thread>
[thread.mutex] Mutual exclusion <mutex>
[thread.condition] Condition variables <condition_variable>
[futures] Futures <future>

C.3 C standard library [diff.library]

Table 149 — Standard macros
assert HUGE_VAL NULL <cstring> SIGINT va_end
BUFSIZ LC_ALL NULL <ctime> SIGSEGV va_start
CLOCKS_PER_SEC LC_COLLATE NULL <cwchar> SIGTERM WCHAR_MAX
EDOM LC_CTYPE offsetof SIG_DFL WCHAR_MIN
EILSEQ LC_MONETARY RAND_MAX SIG_ERR WEOF <cwchar>
EOF LC_NUMERIC SEEK_CUR SIG_IGN WEOF <cwctype>
ERANGE LC_TIME SEEK_END stderr _IOFBF
errno L_tmpnam SEEK_SET stdin _IOLBF
EXIT_FAILURE MB_CUR_MAX setjmp stdout _IONBF
EXIT_SUCCESS NULL <clocale> SIGABRT TMP_MAX
FILENAME_MAX NULL <cstddef> SIGFPE va_arg
FOPEN_MAX NULL <cstdlib> SIGILL va_copy

C.3 C standard library [diff.library]

Table 150 — Standard values
CHAR_BIT FLT_DIG INT_MIN MB_LEN_MAX
CHAR_MAX FLT_EPSILON LDBL_DIG SCHAR_MAX
CHAR_MIN FLT_MANT_DIG LDBL_EPSILON SCHAR_MIN
DBL_DIG FLT_MAX LDBL_MANT_DIG SHRT_MAX
DBL_EPSILON FLT_MAX_10_EXP LDBL_MAX SHRT_MIN
DBL_MANT_DIG FLT_MAX_EXP LDBL_MAX_10_EXP UCHAR_MAX
DBL_MAX FLT_MIN LDBL_MAX_EXP UINT_MAX
DBL_MAX_10_EXP FLT_MIN_10_EXP LDBL_MIN ULONG_MAX
DBL_MAX_EXP FLT_MIN_EXP LDBL_MIN_10_EXP USRT_MAX
DBL_MIN FLT_RADIX LDBL_MIN_EXP
DBL_MIN_10_EXP FLT_ROUNDS LONG_MAX
DBL_MIN_EXP INT_MAX LONG_MIN

C.3 C standard library [diff.library]

Table 151 — Standard types
clock_t ldiv_t size_t <cstdio> va_list
div_t mbstate_t size_t <cstdlib> wctrans_t
FILE ptrdiff_t size_t <cstring> wctype_t
fpos_t sig_atomic_t size_t <ctime> wint_t <cwchar>
jmp_buf size_t <cstddef> time_t wint_t <cwctype>

C.3 C standard library [diff.library]

Table 152 — Standard structs
lconv tm

C.3 C standard library [diff.library]

Table 153 — Standard functions
abort fmod isupper mktime strftime wcrtomb
abs fopen iswalnum modf strlen wcscat
acos fprintf iswalpha perror strncat wcschr
asctime fputc iswcntrl pow strncmp wcscmp
asin fputs iswctype printf strncpy wcscoll
atan fputwc iswdigit putc strpbrk wcscpy
atan2 fputws iswgraph putchar strrchr wcscspn
atexit fread iswlower puts strspn wcsftime
atof free iswprint putwc strstr wcslen
atoi freopen iswpunct putwchar strtod wcsncat
atol frexp iswspace qsort strtok wcsncmp
bsearch fscanf iswupper raise strtol wcsncpy
btowc fseek iswxdigit rand strtoul wcspbrk
calloc fsetpos isxdigit realloc strxfrm wcsrchr
ceil ftell labs remove swprintf wcsrtombs
clearerr fwide ldexp rename swscanf wcsspn
clock fwprintf ldiv rewind system wcsstr
cos fwrite localeconv scanf tan wcstod
cosh fwscanf localtime setbuf tanh wcstok
ctime getc log setlocale time wcstol
difftime getchar log10 setvbuf tmpfile wcstombs
div getenv longjmp signal tmpnam wcstoul
exit gets malloc sin tolower wcsxfrm
exp getwc mblen sinh toupper wctob
fabs getwchar mbrlen sprintf towctrans wctomb
fclose gmtime mbrtowc sqrt towlower wctrans
feof isalnum mbsinit srand towupper wctype
ferror isalpha mbsrtowcs sscanf ungetc wmemchr
fflush iscntrl mbstowcs strcat ungetwc wmemcmp
fgetc isdigit mbtowc strchr vfprintf wmemcpy
fgetpos isgraph memchr strcmp vfwprintf wmemmove
fgets islower memcmp strcoll vprintf wmemset
fgetwc isprint memcpy strcpy vsprintf wprintf
fgetws ispunct memmove strcspn vswprintf wscanf
floor isspace memset strerror vwprintf

D.5 C standard library headers [depr.c.headers]

Table 154 — C headers
<assert.h> <inttypes.h> <signal.h> <stdio.h> <wchar.h>
<complex.h> <iso646.h> <stdalign.h> <stdlib.h> <wctype.h>
<ctype.h> <limits.h> <stdarg.h> <string.h>
<errno.h> <locale.h> <stdbool.h> <tgmath.h>
<fenv.h> <math.h> <stddef.h> <time.h>
<float.h> <setjmp.h> <stdint.h> <uchar.h>

D.7.1.1 strstreambuf constructors [depr.strstreambuf.cons]

Table 155strstreambuf(streamsize) effects
ElementValue
strmode dynamic
alsize alsize_arg
palloc a null pointer
pfree a null pointer

D.7.1.1 strstreambuf constructors [depr.strstreambuf.cons]

Table 156strstreambuf(void* (*)(size_t), void (*)(void*)) effects
ElementValue
strmode dynamic
alsize an unspecified value
palloc palloc_arg
pfree pfree_arg

D.7.1.1 strstreambuf constructors [depr.strstreambuf.cons]

Table 157strstreambuf(charT*, streamsize, charT*) effects
ElementValue
strmode 0
alsize an unspecified value
palloc a null pointer
pfree a null pointer

D.7.1.3 strstreambuf overridden virtual functions [depr.strstreambuf.virtuals]

Table 158seekoff positioning
ConditionsResult
(which & ios::in) != 0 positions the input sequence
(which & ios::out) != 0 positions the output sequence
(which & (ios::in |
ios::out)) == (ios::in |
ios::out)) and
way == either
ios::beg or
ios::end
positions both the input and the output sequences
Otherwise the positioning operation fails.

D.7.1.3 strstreambuf overridden virtual functions [depr.strstreambuf.virtuals]

Table 159newoff values
Conditionnewoff Value
way == ios::beg 0
way == ios::cur the next pointer minus the beginning pointer (xnext - xbeg).
way == ios::end seekhigh minus the beginning pointer (seekhigh - xbeg).
If (newoff + off) <
(seeklow - xbeg),
or (seekhigh - xbeg) <
(newoff + off)
the positioning operation fails