Tables [tab]

Table 1: Basic character set [tab:lex.charset.basic]
character
glyph
U+0009
character tabulation
U+000b
line tabulation
U+000c
form feed
U+0020
space
U+000a
line feed
new-line
U+0021
exclamation mark
!
U+0022
quotation mark
"
U+0023
number sign
#
U+0024
dollar sign
$
U+0025
percent sign
%
U+0026
ampersand
&
U+0027
apostrophe
'
U+0028
left parenthesis
(
U+0029
right parenthesis
)
U+002a
asterisk
*
U+002b
plus sign
+
U+002c
comma
,
U+002d
hyphen-minus
-
U+002e
full stop
.
U+002f
solidus
/
U+0030 ..
U+0039
digit zero .. nine
0 1 2 3 4 5 6 7 8 9
U+003a
colon
:
U+003b
semicolon
;
U+003c
less-than sign
<
U+003d
equals sign
=
U+003e
greater-than sign
>
U+003f
question mark
?
U+0040
commercial at
@
U+0041 ..
U+005a
latin capital letter a .. z
A B C D E F G H I J K L M
N O P Q R S T U V W X Y Z
U+005b
left square bracket
[
U+005c
reverse solidus
\
U+005d
right square bracket
]
U+005e
circumflex accent
^
U+005f
low line
_
U+0060
grave accent
`
U+0061 ..
U+007a
latin small letter a .. z
a b c d e f g h i j k l m
n o p q r s t u v w x y z
U+007b
left curly bracket
{
U+007c
vertical line
|
U+007d
right curly bracket
}
U+007e
tilde
~
Table 2: Additional control characters in the basic literal character set [tab:lex.charset.literal]
character
U+0000
null
U+0007
alert
U+0008
backspace
U+000d
carriage return
Table 3: Alternative tokens [tab:lex.digraph]
Alternative
Primary
Alternative
Primary
Alternative
Primary
<%
{
and
&&
and_eq
&=
%>
}
bitor
|
or_eq
|=
<:
[
or
||
xor_eq
^=
:>
]
xor
^
not
!
%:
#
compl
~
not_eq
!=
%:%:
##
bitand
&
Table 4: Identifiers with special meaning [tab:lex.name.special]
final
import
module
override
Table 5: Keywords [tab:lex.key]
alignas
constinit
false
public
true
alignof
const_cast
float
register
try
asm
continue
for
reinterpret_cast
typedef
auto
co_await
friend
requires
typeid
bool
co_return
goto
return
typename
break
co_yield
if
short
union
case
decltype
inline
signed
unsigned
catch
default
int
sizeof
using
char
delete
long
static
virtual
char8_t
do
mutable
static_assert
void
char16_t
double
namespace
static_cast
volatile
char32_t
dynamic_cast
new
struct
wchar_t
class
else
noexcept
switch
while
concept
enum
nullptr
template
const
explicit
operator
this
consteval
export
private
thread_local
constexpr
extern
protected
throw
Table 6: Alternative representations [tab:lex.key.digraph]
and
and_eq
bitand
bitor
compl
not
not_eq
or
or_eq
xor
xor_eq
Table 7: Base of integer-literals[tab:lex.icon.base]
base N
2
8
10
16
Table 8: Types of integer-literals[tab:lex.icon.type]
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
z or Z
the signed integer type corresponding
the signed integer type
  to std​::​size_t ([support.types.layout])
  corresponding to std​::​size_t
std​::​size_t
Both u or U
std​::​size_t
std​::​size_t
and z or Z
Table 9: Character literals [tab:lex.ccon.literal]
Encoding
Kind
Type
Associated char-
Example
prefix
acter encoding
none
char
ordinary literal
'v'
multicharacter literal
int
encoding
'abcd'
L
wchar_t
wide literal
L'w'
encoding
u8
char8_t
UTF-8
u8'x'
u
char16_t
UTF-16
u'y'
U
char32_t
UTF-32
U'z'
Table 10: Simple escape sequences [tab:lex.ccon.esc]
character
U+000a
line feed
\n
U+0009
character tabulation
\t
U+000b
line tabulation
\v
U+0008
backspace
\b
U+000d
carriage return
\r
U+000c
form feed
\f
U+0007
alert
\a
U+005c
reverse solidus
\\
U+003f
question mark
\?
U+0027
apostrophe
\'
U+0022
quotation mark
\"
Table 11: Types of floating-point-literals[tab:lex.fcon.type]
type
none
double
f or F
float
l or L
long double
f16 or F16
std::float16_t
f32 or F32
std::float32_t
f64 or F64
std::float64_t
f128 or F128
std::float128_t
bf16 or BF16
std::bfloat16_t
Table 12: String literals [tab:lex.string.literal]
Encoding
Kind
Type
Associated
Examples
prefix
character
encoding
none
array of n
const char
ordinary literal encoding
"ordinary string"
R"(ordinary raw string)"
L
array of n
const wchar_t
wide literal
encoding
L"wide string"
LR"w(wide raw string)w"
u8
array of n
const char8_t
UTF-8
u8"UTF-8 string"
u8R"x(UTF-8 raw string)x"
u
array of n
const char16_t
UTF-16
u"UTF-16 string"
uR"y(UTF-16 raw string)y"
U
array of n
const char32_t
UTF-32
U"UTF-32 string"
UR"z(UTF-32 raw string)z"
Table 13: String literal concatenations [tab:lex.string.concat]
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"
Table 14: Minimum width [tab:basic.fundamental.width]
Type
Minimum width N
signed char
8
short int
16
int
16
long int
32
long long int
64
Table 15: Properties of named extended floating-point types [tab:basic.extended.fp]
Parameter
float16_t
float32_t
float64_t
float128_t
bfloat16_t
ISO/IEC/IEEE 60559 name
binary16
binary32
binary64
binary128
k, storage width in bits
16
32
64
128
16
p, precision in bits
11
24
53
113
8
emax, maximum exponent
15
127
1023
16383
127
w, exponent field width in bits
5
8
11
15
8
Table 16: Relations on const and volatile[tab:basic.type.qualifier.rel]
no cv-qualifier
<
const
no cv-qualifier
<
volatile
no cv-qualifier
<
const volatile
const
<
const volatile
volatile
<
const volatile
Table 17: simple-type-specifiers and the types they specify [tab:dcl.type.simple]
Specifier(s)
Type
the type named
the type as defined in [temp.names]
the type as defined in [dcl.type.decltype]
the type as defined in [dcl.type.pack.index]
the type as defined in [dcl.spec.auto]
the type as defined in [dcl.type.class.deduct]
char
char
unsigned char
unsigned char
signed char
signed char
char8_t
char8_t
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
Table 18: Relationship between operator and function call notation [tab:over.match.oper]
Subclause
Expression
As member function
As non-member function
@a
(a).operator@ ()
operator@(a)
a@b
(a).operator@ (b)
operator@(a, b)
a=b
(a).operator= (b)
a[b]
(a).operator[](b)
a->
(a).operator->()
a@
(a).operator@ (0)
operator@(a, 0)
Table 19: Conversions [tab:over.ics.scs]
Conversion
Category
Rank
Subclause
No conversions required
Identity
Lvalue-to-rvalue conversion
Array-to-pointer conversion
Lvalue Transformation
Function-to-pointer conversion
Exact Match
Qualification conversions
Function pointer conversion
Qualification Adjustment
Integral promotions
Floating-point promotion
Promotion
Promotion
Integral conversions
Floating-point conversions
Floating-integral conversions
Pointer conversions
Conversion
Conversion
Pointer-to-member conversions
Boolean conversions
Table 20: Value of folding empty sequences [tab:temp.fold.empty]
Operator
Value when pack is empty
&&
true
||
false
,
void()
Table 21: __has_cpp_attribute values [tab:cpp.cond.ha]
Attribute
Value
assume
202207L
carries_dependency
200809L
deprecated
201309L
fallthrough
201603L
likely
201803L
maybe_unused
201603L
no_unique_address
201803L
nodiscard
201907L
noreturn
200809L
unlikely
201803L
Table 22: Feature-test macros [tab:cpp.predefined.ft]
Macro name
Value
__cpp_aggregate_bases
201603L
__cpp_aggregate_nsdmi
201304L
__cpp_aggregate_paren_init
201902L
__cpp_alias_templates
200704L
__cpp_aligned_new
201606L
__cpp_attributes
200809L
__cpp_auto_cast
202110L
__cpp_binary_literals
201304L
__cpp_capture_star_this
201603L
__cpp_char8_t
202207L
__cpp_concepts
202002L
__cpp_conditional_explicit
201806L
__cpp_constexpr
202306L
__cpp_constexpr_dynamic_alloc
201907L
__cpp_constexpr_in_decltype
201711L
__cpp_consteval
202211L
__cpp_constinit
201907L
__cpp_decltype
200707L
__cpp_decltype_auto
201304L
__cpp_deduction_guides
201907L
__cpp_delegating_constructors
200604L
__cpp_deleted_function
202403L
__cpp_designated_initializers
201707L
__cpp_enumerator_attributes
201411L
__cpp_explicit_this_parameter
202110L
__cpp_fold_expressions
201603L
__cpp_generic_lambdas
201707L
__cpp_guaranteed_copy_elision
201606L
__cpp_hex_float
201603L
__cpp_if_consteval
202106L
__cpp_if_constexpr
201606L
__cpp_impl_coroutine
201902L
__cpp_impl_destroying_delete
201806L
__cpp_impl_three_way_comparison
201907L
__cpp_implicit_move
202207L
__cpp_inheriting_constructors
201511L
__cpp_init_captures
201803L
__cpp_initializer_lists
200806L
__cpp_inline_variables
201606L
__cpp_lambdas
200907L
__cpp_modules
201907L
__cpp_multidimensional_subscript
202211L
__cpp_named_character_escapes
202207L
__cpp_namespace_attributes
201411L
__cpp_noexcept_function_type
201510L
__cpp_nontype_template_args
201911L
__cpp_nontype_template_parameter_auto
201606L
__cpp_nsdmi
200809L
__cpp_pack_indexing
202311L
__cpp_placeholder_variables
202306L
__cpp_range_based_for
202211L
__cpp_raw_strings
200710L
__cpp_ref_qualifiers
200710L
__cpp_return_type_deduction
201304L
__cpp_rvalue_references
200610L
__cpp_size_t_suffix
202011L
__cpp_sized_deallocation
201309L
__cpp_static_assert
202306L
__cpp_static_call_operator
202207L
__cpp_structured_bindings
202403L
__cpp_template_template_args
201611L
__cpp_threadsafe_static_init
200806L
__cpp_unicode_characters
200704L
__cpp_unicode_literals
200710L
__cpp_user_defined_literals
200809L
__cpp_using_enum
201907L
__cpp_variable_templates
201304L
__cpp_variadic_friend
202403L
__cpp_variadic_templates
200704L
__cpp_variadic_using
201611L
Table 23: Library categories [tab:library.categories]
Clause
Category
Language support library
Concepts library
Diagnostics library
Memory management library
Metaprogramming library
General utilities library
Strings library
Containers library
Iterators library
Ranges library
Algorithms library
Numerics library
Time library
Localization library
Input/output library
Regular expressions library
Concurrency support library
Table 24: C++ library headers [tab:headers.cpp]
<algorithm>
<forward_list>
<mutex>
<stacktrace>
<any>
<fstream>
<new>
<stdexcept>
<array>
<functional>
<numbers>
<stdfloat>
<atomic>
<future>
<numeric>
<stop_token>
<barrier>
<generator>
<optional>
<streambuf>
<bit>
<hazard_pointer>
<ostream>
<string>
<bitset>
<initializer_list>
<print>
<string_view>
<charconv>
<iomanip>
<queue>
<syncstream>
<chrono>
<ios>
<random>
<system_error>
<compare>
<iosfwd>
<ranges>
<text_encoding>
<complex>
<iostream>
<ratio>
<thread>
<concepts>
<istream>
<rcu>
<tuple>
<condition_variable>
<iterator>
<regex>
<type_traits>
<coroutine>
<latch>
<scoped_allocator>
<typeindex>
<debugging>
<limits>
<semaphore>
<typeinfo>
<deque>
<linalg>
<set>
<unordered_map>
<exception>
<list>
<shared_mutex>
<unordered_set>
<execution>
<locale>
<source_location>
<utility>
<expected>
<map>
<span>
<valarray>
<filesystem>
<mdspan>
<spanstream>
<variant>
<flat_map>
<memory>
<sstream>
<vector>
<flat_set>
<memory_resource>
<stack>
<version>
<format>
Table 25: C++ headers for C library facilities [tab:headers.cpp.c]
<cassert>
<cfenv>
<climits>
<csetjmp>
<cstddef>
<cstdlib>
<cuchar>
<cctype>
<cfloat>
<clocale>
<csignal>
<cstdint>
<cstring>
<cwchar>
<cerrno>
<cinttypes>
<cmath>
<cstdarg>
<cstdio>
<ctime>
<cwctype>
Table 26: Names from ISO/IEC 9899:2018, Annex K [tab:c.annex.k.names]
abort_handler_s
mbstowcs_s
strncat_s
vswscanf_s
asctime_s
memcpy_s
strncpy_s
vwprintf_s
bsearch_s
memmove_s
strtok_s
vwscanf_s
constraint_handler_t
memset_s
swprintf_s
wcrtomb_s
ctime_s
printf_s
swscanf_s
wcscat_s
errno_t
qsort_s
tmpfile_s
wcscpy_s
fopen_s
RSIZE_MAX
TMP_MAX_S
wcsncat_s
fprintf_s
rsize_t
tmpnam_s
wcsncpy_s
freopen_s
scanf_s
vfprintf_s
wcsnlen_s
fscanf_s
set_constraint_handler_s
vfscanf_s
wcsrtombs_s
fwprintf_s
snprintf_s
vfwprintf_s
wcstok_s
fwscanf_s
snwprintf_s
vfwscanf_s
wcstombs_s
getenv_s
sprintf_s
vprintf_s
wctomb_s
gets_s
sscanf_s
vscanf_s
wmemcpy_s
gmtime_s
strcat_s
vsnprintf_s
wmemmove_s
ignore_handler_s
strcpy_s
vsnwprintf_s
wprintf_s
localtime_s
strerrorlen_s
vsprintf_s
wscanf_s
L_tmpnam_s
strerror_s
vsscanf_s
mbsrtowcs_s
strlen_s
vswprintf_s
Table 27: C++ headers for freestanding implementations [tab:headers.cpp.fs]
Subclause
Header
Common definitions
<cstddef>
C standard library
<cstdlib>
Implementation properties
<cfloat>, <climits>, <limits>,
<version>
Integer types
<cstdint>
Dynamic memory management
<new>
Type identification
<typeinfo>
Source location
<source_location>
Exception handling
<exception>
Initializer lists
<initializer_list>
Comparisons
<compare>
Coroutines support
<coroutine>
Other runtime support
<cstdarg>
Concepts library
<concepts>
Error numbers
<cerrno>
System error support
<system_error>
Memory
<memory>
Type traits
<type_traits>
Compile-time rational arithmetic
<ratio>
Utility components
<utility>
Tuples
<tuple>
Optional objects
<optional>
Variants
<variant>
Expected objects
<expected>
Function objects
<functional>
Primitive numeric conversions
<charconv>
Bit manipulation
<bit>
Debugging
<debugging>
String view classes
<string_view>
String classes
<string>
Null-terminated sequence utilities
<cstring>, <cwchar>
Class template array
<array>
Contiguous access
<span>
Multidimensional access
<mdspan>
Iterators library
<iterator>
Ranges library
<ranges>
Algorithms library
<algorithm>, <numeric>
Mathematical functions for floating-point types
<cmath>
Atomics
<atomic>
Table 28: Cpp17EqualityComparable requirements [tab:cpp17.equalitycomparable]
Expression
Return type
Requirement
a == b
decltype(a == b) models boolean-testable
== 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.
Table 29: Cpp17LessThanComparable requirements [tab:cpp17.lessthancomparable]
Expression
Return type
Requirement
a < b
decltype(a < b) models boolean-testable
< is a strict weak ordering relation ([alg.sorting])
Table 30: Cpp17DefaultConstructible requirements [tab:cpp17.defaultconstructible]
Expression
Post-condition
T t;
object t is default-initialized
T u{};
object u is value-initialized or aggregate-initialized
T()
T{}
an object of type T is value-initialized or aggregate-initialized
Table 31: Cpp17MoveConstructible requirements [tab:cpp17.moveconstructible]
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 1: 
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]
Table 32: Cpp17CopyConstructible requirements (in addition to Cpp17MoveConstructible) [tab:cpp17.copyconstructible]
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)
Table 33: Cpp17MoveAssignable requirements [tab:cpp17.moveassignable]
Expression
Return type
Return value
Post-condition
t = rv
T&
t
If t and rv do not refer to the same object, t is equivalent to the value of rv before the assignment
rv's state is unspecified.
[Note 2: 
rv must still meet the requirements of the library component that is using it, whether or not t and rv refer to the same object.
The operations listed in those requirements must work as specified whether rv has been moved from or not.
— end note]
Table 34: Cpp17CopyAssignable requirements (in addition to Cpp17MoveAssignable) [tab:cpp17.copyassignable]
Expression
Return type
Return value
Post-condition
t = v
T&
t
t is equivalent to v, the value of v is unchanged
Table 35: Cpp17Destructible requirements [tab:cpp17.destructible]
Expression
Post-condition
u.~T()
All resources owned by u are reclaimed, no exception is propagated.
[Note 3: 
Array types and non-object types are not Cpp17Destructible.
— end note]
Table 36: Cpp17NullablePointer requirements [tab:cpp17.nullablepointer]
Expression
Return type
Operational semantics
P u(np);
Postconditions: u == nullptr
P u = np;
P(np)
Postconditions: P(np) == nullptr
t = np
P&
Postconditions: t == nullptr
a != b
decltype(a != b) models boolean-testable
!(a == b)
a == np
decltype(a == np) and decltype(np == a) each model boolean-testable
a == P()
np == a
a != np
decltype(a != np) and decltype(np != a) each model boolean-testable
!(a == np)
np != a
Table 37: Cpp17Hash requirements [tab:cpp17.hash]
Expression
Return type
Requirement
h(k)
size_t
The value returned shall depend only on the argument k for the duration of the program.
[Note 1: 
Thus all evaluations of the expression h(k) with the same value for k yield the same result for a given execution of the program.
— end 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().
h(u)
size_t
Shall not modify u.
Table 38: Zombie names in namespace std[tab:zombie.names.std]
auto_ptr
generate_header
pointer_to_binary_function
auto_ptr_ref
get_pointer_safety
pointer_to_unary_function
binary_function
get_temporary_buffer
ptr_fun
binary_negate
get_unexpected
random_shuffle
bind1st
gets
raw_storage_iterator
bind2nd
is_literal_type
result_of
binder1st
is_literal_type_v
result_of_t
binder2nd
istrstream
return_temporary_buffer
codecvt_mode
little_endian
set_unexpected
codecvt_utf16
mem_fun1_ref_t
strstream
codecvt_utf8
mem_fun1_t
strstreambuf
codecvt_utf8_utf16
mem_fun_ref_t
unary_function
const_mem_fun1_ref_t
mem_fun_ref
unary_negate
const_mem_fun1_t
mem_fun_t
uncaught_exception
const_mem_fun_ref_t
mem_fun
undeclare_no_pointers
const_mem_fun_t
not1
undeclare_reachable
consume_header
not2
unexpected_handler
declare_no_pointers
ostrstream
wbuffer_convert
declare_reachable
pointer_safety
wstring_convert
Table 39: Zombie object-like macros [tab:zombie.names.objmacro]
argument_type
op
second_argument_type
first_argument_type
open_mode
seek_dir
io_state
preferred
strict
Table 40: Zombie function-like macros [tab:zombie.names.fnmacro]
converted
freeze
from_bytes
pcount
stossc
to_bytes
Table 41: Zombie headers [tab:zombie.names.header]
<ccomplex>
<codecvt>
<cstdbool>
<ctgmath>
<strstream>
<ciso646>
<cstdalign>
Table 42: Language support library summary [tab:support.summary]
Subclause
Header
Common definitions
<cstddef>, <cstdlib>
Implementation properties
<cfloat>, <climits>, <limits>, <version>
Arithmetic types
<cstdint>, <stdfloat>
Start and termination
<cstdlib>
Dynamic memory management
<new>
Type identification
<typeinfo>
Source location
<source_location>
Exception handling
<exception>
Initializer lists
<initializer_list>
Comparisons
<compare>
Coroutines
<coroutine>
Other runtime support
<csetjmp>, <csignal>, <cstdarg>, <cstdlib>
Table 43: Value of object returned by current[tab:support.srcloc.current]
Element
Value
line_
A presumed line number ([cpp.predefined]).
Line numbers are presumed to be 1-indexed; however, an implementation is encouraged to use 0 when the line number is unknown.
column_
An implementation-defined value denoting some offset from the start of the line denoted by line_.
Column numbers are presumed to be 1-indexed; however, an implementation is encouraged to use 0 when the column number is unknown.
file_name_
A presumed name of the current source file ([cpp.predefined]) as an ntbs.
function_name_
A name of the current function such as in __func__ ([dcl.fct.def.general]) if any, an empty string otherwise.
Table 44: C headers [tab:c.headers]
<assert.h>
<inttypes.h>
<signal.h>
<stdint.h>
<uchar.h>
<stdio.h>
<wchar.h>
<ctype.h>
<limits.h>
<stdarg.h>
<stdlib.h>
<wctype.h>
<errno.h>
<locale.h>
<string.h>
<fenv.h>
<math.h>
<float.h>
<setjmp.h>
<stddef.h>
<time.h>
Table 45: Fundamental concepts library summary [tab:concepts.summary]
Subclause
Header
Equality preservation
Language-related concepts
<concepts>
Comparison concepts
Object concepts
Callable concepts
Table 46: Diagnostics library summary [tab:diagnostics.summary]
Subclause
Header
Exception classes
<stdexcept>
Assertions
<cassert>
Error numbers
<cerrno>
System error support
<system_error>
Stacktrace
<stacktrace>
Table 47: Memory management library summary [tab:mem.summary]
Subclause
Header
Memory
<cstdlib>, <memory>
Smart pointers
<memory>
Memory resources
<memory_resource>
Scoped allocators
<scoped_allocator>
Table 48: Metaprogramming library summary [tab:meta.summary]
Subclause
Header
Integer sequences
<utility>
Type traits
<type_traits>
Rational arithmetic
<ratio>
Table 49: Primary type category predicates [tab:meta.unary.cat]
Template
Condition
Comments
template<class T>
struct is_void;
T is void
template<class T>
struct is_null_pointer;
T is nullptr_t ([basic.fundamental])
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 data member
template<class T>
struct is_member_function_pointer;
T is a pointer to 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 non-union class type ([basic.compound])
template<class T>
struct is_function;
T is a function type ([basic.compound])
Table 50: Composite type category predicates [tab:meta.unary.comp]
Template
Condition
Comments
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.general])
template<class T>
struct is_scalar;
T is a scalar type ([basic.types.general])
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-member type ([basic.compound])
Table 51: Type property predicates [tab:meta.unary.prop]
Template
Condition
Preconditions
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.general])
remove_all_extents_t<T> shall be a complete type or cv void.
template<class T>
struct is_trivially_copyable;
T is a trivially copyable type ([basic.types.general])
remove_all_extents_t<T> shall be a complete type or cv void.
template<class T>
struct is_standard_layout;
T is a standard-layout type ([basic.types.general])
remove_all_extents_t<T> shall be a complete type or cv void.
template<class T>
struct is_empty;
T is a class type, but not a union type, with no non-static data members other than subobjects of zero size, no virtual member functions, no virtual base classes, and no base class B for which is_empty_v<B> is false.
If T is a non-union class type, T shall be a complete type.
template<class T>
struct is_polymorphic;
T is a polymorphic class ([class.virtual])
If T is a non-union class type, T shall be a complete type.
template<class T>
struct is_abstract;
T is an abstract class ([class.abstract])
If T is a non-union class type, T shall be a complete type.
template<class T>
struct is_final;
T is a class type marked with the class-virt-specifier final ([class.pre]).
[Note 2: 
A union is a class type that can be marked with final.
— end note]
If T is a class type, T shall be a complete type.
template<class T>
struct is_aggregate;
T is an aggregate type ([dcl.init.aggr])
T shall be an array type, a complete type, or cv void.
template<class T>
struct is_signed;
If is_arithmetic_v<T> is true, the same result as T(-1) < T(0); otherwise, false
template<class T>
struct is_unsigned;
If is_arithmetic_v<T> is true, the same result as T(0) < T(-1); otherwise, false
template<class T>
struct is_bounded_array;
T is an array type of known bound ([dcl.array])
template<class T>
struct is_unbounded_array;
T is an array type of unknown bound ([dcl.array])
template<class T>
struct is_scoped_enum;
T is a scoped enumeration ([dcl.enum])
template<class T, class... Args>
struct is_constructible;
For a function type T or for a cv void type T, is_constructible_v<T, Args...> is false, otherwise see below
T and all types in the template parameter pack Args shall be complete types, cv void, or arrays of unknown bound.
template<class T>
struct is_default_constructible;
is_constructible_v<T> is true.
T shall be a complete type, cv void, or an array of unknown bound.
template<class T>
struct is_copy_constructible;
For a referenceable type T ([defns.referenceable]), the same result as is_constructible_v<T, const T&>, otherwise false.
T shall be a complete type, cv void, or an array of unknown bound.
template<class T>
struct is_move_constructible;
For a referenceable type T, the same result as is_constructible_v<T, T&&>, otherwise false.
T shall be a complete type, cv 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 ([expr.context]).
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 3: 
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, cv void, or arrays of unknown bound.
template<class T>
struct is_copy_assignable;
For a referenceable type T, the same result as is_assignable_v<T&, const T&>, otherwise false.
T shall be a complete type, cv void, or an array of unknown bound.
template<class T>
struct is_move_assignable;
For a referenceable type T, the same result as is_assignable_v<T&, T&&>, otherwise false.
T shall be a complete type, cv void, or an array of unknown bound.
template<class T, class U>
struct is_swappable_with;
The expressions swap(declval<T>(), declval<U>()) and swap(declval<U>(), declval<T>()) are each well-formed when treated as an unevaluated operand ([expr.context]) in an overload-resolution context for swappable values ([swappable.requirements]).
Access checking is performed as if in a context unrelated to T and U.
Only the validity of the immediate context of the swap expressions is considered.
[Note 4: 
The compilation of the expressions can result in side effects such as the instantiation of class template specializations and function template specializations, the generation of implicitly-defined functions, and so on.
Such side effects are not in the “immediate context” and can result in the program being ill-formed.
— end note]
T and U shall be complete types, cv void, or arrays of unknown bound.
template<class T>
struct is_swappable;
For a referenceable type T, the same result as is_swappable_with_v<T&, T&>, otherwise false.
T shall be a complete type, cv void, or an array of unknown bound.
template<class T>
struct is_destructible;
Either T is a reference type, or T is a complete object type for which the expression declval<U&>().~U() is well-formed when treated as an unevaluated operand ([expr.context]), where U is remove_all_extents_t<T>.
T shall be a complete type, cv void, or an array of unknown bound.
template<class T, class... Args>
struct
is_trivially_constructible;
is_constructible_v<T,
Args...> is true and the variable definition for is_constructible, as defined below, is known to call no operation that is not trivial ([basic.types.general], [special]).
T and all types in the template parameter pack Args shall be complete types, cv void, or arrays of unknown bound.
template<class T>
struct is_trivially_default_constructible;
is_trivially_constructible_v<T> is true.
T shall be a complete type, cv void, or an array of unknown bound.
template<class T>
struct is_trivially_copy_constructible;
For a referenceable type T, the same result as is_trivially_constructible_v<T, const T&>, otherwise false.
T shall be a complete type, cv void, or an array of unknown bound.
template<class T>
struct is_trivially_move_constructible;
For a referenceable type T, the same result as is_trivially_constructible_v<T, T&&>, otherwise false.
T shall be a complete type, cv void, or an array of unknown bound.
template<class T, class U>
struct is_trivially_assignable;
is_assignable_v<T, U> is true and the assignment, as defined by is_assignable, is known to call no operation that is not trivial ([basic.types.general], [special]).
T and U shall be complete types, cv void, or arrays of unknown bound.
template<class T>
struct is_trivially_copy_assignable;
For a referenceable type T, the same result as is_trivially_assignable_v<T&, const T&>, otherwise false.
T shall be a complete type, cv void, or an array of unknown bound.
template<class T>
struct is_trivially_move_assignable;
For a referenceable type T, the same result as is_trivially_assignable_v<T&, T&&>, otherwise false.
T shall be a complete type, cv void, or an array of unknown bound.
template<class T>
struct is_trivially_destructible;
is_destructible_v<T> is true and remove_all_extents_t<T> is either a non-class type or a class type with a trivial destructor.
T shall be a complete type, cv void, or an array of unknown bound.
template<class T, class... Args>
struct is_nothrow_constructible;
is_constructible_v<T, Args...> is true and the variable definition for is_constructible, as defined below, is known not to throw any exceptions ([expr.unary.noexcept]).
T and all types in the template parameter pack Args shall be complete types, cv void, or arrays of unknown bound.
template<class T>
struct is_nothrow_default_constructible;
is_nothrow_constructible_v<T> is true.
T shall be a complete type, cv void, or an array of unknown bound.
template<class T>
struct is_nothrow_copy_constructible;
For a referenceable type T, the same result as is_nothrow_constructible_v<T, const T&>, otherwise false.
T shall be a complete type, cv void, or an array of unknown bound.
template<class T>
struct is_nothrow_move_constructible;
For a referenceable type T, the same result as is_nothrow_constructible_v<T, T&&>, otherwise false.
T shall be a complete type, cv void, or an array of unknown bound.
template<class T, class U>
struct is_nothrow_assignable;
is_assignable_v<T, U> is true and the assignment is known not to throw any exceptions ([expr.unary.noexcept]).
T and U shall be complete types, cv void, or arrays of unknown bound.
template<class T>
struct is_nothrow_copy_assignable;
For a referenceable type T, the same result as is_nothrow_assignable_v<T&, const T&>, otherwise false.
T shall be a complete type, cv void, or an array of unknown bound.
template<class T>
struct is_nothrow_move_assignable;
For a referenceable type T, the same result as is_nothrow_assignable_v<T&, T&&>, otherwise false.
T shall be a complete type, cv void, or an array of unknown bound.
template<class T, class U>
struct is_nothrow_swappable_with;
is_swappable_with_v<T, U> is true and each swap expression of the definition of is_swappable_with<T, U> is known not to throw any exceptions ([expr.unary.noexcept]).
T and U shall be complete types, cv void, or arrays of unknown bound.
template<class T>
struct is_nothrow_swappable;
For a referenceable type T, the same result as is_nothrow_swappable_with_v<T&, T&>, otherwise false.
T shall be a complete type, cv void, or an array of unknown bound.
template<class T>
struct is_nothrow_destructible;
is_destructible_v<T> is true and the indicated destructor is known not to throw any exceptions ([expr.unary.noexcept]).
T shall be a complete type, cv void, or an array of unknown bound.
template<class T>
struct is_implicit_lifetime;
T is an implicit-lifetime type ([basic.types.general]).
T shall be an array type, a complete type, or cv void.
template<class T>
struct has_virtual_destructor;
T has a virtual destructor ([class.dtor])
If T is a non-union class type, T shall be a complete type.
template<class T>
struct has_unique_object_representations;
For an array type T, the same result as has_unique_object_representations_v<remove_all_extents_t<T>>, otherwise see below.
T shall be a complete type, cv void, or an array of unknown bound.
template<class T, class U>
struct reference_constructs_from_temporary;
T is a reference type, and the initialization T t(VAL<U>); is well-formed and binds t to a temporary object whose lifetime is extended ([class.temporary]).
Access checking is performed as if in a context unrelated to T and U.
Only the validity of the immediate context of the variable initialization is considered.
[Note 5: 
The initialization can result in effects such as the instantiation of class template specializations and function template specializations, the generation of implicitly-defined functions, and so on.
Such 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, cv void, or arrays of unknown bound.
template<class T, class U>
struct reference_converts_from_temporary;
T is a reference type, and the initialization T t = VAL<U>; is well-formed and binds t to a temporary object whose lifetime is extended ([class.temporary]).
Access checking is performed as if in a context unrelated to T and U.
Only the validity of the immediate context of the variable initialization is considered.
[Note 6: 
The initialization can result in effects such as the instantiation of class template specializations and function template specializations, the generation of implicitly-defined functions, and so on.
Such 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, cv void, or arrays of unknown bound.
Table 52: Type property queries [tab:meta.unary.prop.query]
Template
Value
template<class T>
struct alignment_of;
alignof(T).

Mandates: alignof(T) is a valid expression ([expr.alignof])
template<class T>
struct rank;
If T is 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 dimension of T, where indexing of I is zero-based
Table 53: Type relationship predicates [tab:meta.rel]
Template
Condition
Comments
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 non-union class types and are not (possibly cv-qualified versions of) the same type, Derived shall be a complete type.
[Note 1: 
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, cv void, or arrays of unknown bound.
template<class From, class To>
struct is_nothrow_convertible;
is_convertible_v<From, To> is true and the conversion, as defined by is_convertible, is known not to throw any exceptions ([expr.unary.noexcept])
From and To shall be complete types, cv void, or arrays of unknown bound.
template<class T, class U>
struct is_layout_compatible;
T and U are layout-compatible ([basic.types.general])
T and U shall be complete types, cv void, or arrays of unknown bound.
template<class Base, class Derived>
struct is_pointer_interconvertible_base_of;
Derived is unambiguously derived from Base without regard to cv-qualifiers, and each object of type Derived is pointer-interconvertible ([basic.compound]) with its Base subobject, or Base and Derived are not unions and name the same class type without regard to cv-qualifiers.
If Base and Derived are non-union class types and are not (possibly cv-qualified versions of) the same type, Derived shall be a complete type.
template<class Fn, class... ArgTypes>
struct is_invocable;
The expression INVOKE(declval<Fn>(), declval<ArgTypes>()...) ([func.require]) is well-formed when treated as an unevaluated operand ([expr.context])
Fn and all types in the template parameter pack ArgTypes shall be complete types, cv void, or arrays of unknown bound.
template<class R, class Fn, class... ArgTypes>
struct is_invocable_r;
The expression INVOKE<R>(declval<Fn>(), declval<ArgTypes>()...) is well-formed when treated as an unevaluated operand
Fn, R, and all types in the template parameter pack ArgTypes shall be complete types, cv void, or arrays of unknown bound.
template<class Fn, class... ArgTypes>
struct is_nothrow_invocable;
is_invocable_v<
Fn, ArgTypes...> is true and the expression INVOKE(declval<Fn>(), declval<ArgTypes>()...) is known not to throw any exceptions ([expr.unary.noexcept])
Fn and all types in the template parameter pack ArgTypes shall be complete types, cv void, or arrays of unknown bound.
template<class R, class Fn, class... ArgTypes>
struct is_nothrow_invocable_r;
is_invocable_r_v<
R, Fn, ArgTypes...> is true and the expression INVOKE<R>(declval<Fn>(), declval<ArgTypes>()...) is known not to throw any exceptions ([expr.unary.noexcept])
Fn, R, and all types in the template parameter pack ArgTypes shall be complete types, cv void, or arrays of unknown bound.
Table 54: Const-volatile modifications [tab:meta.trans.cv]
Template
Comments
template<class T>
struct remove_const;
The member typedef type denotes the type formed by removing any top-level const-qualifier from T.
[Example 1: 
remove_const_t<const volatile int> evaluates to volatile int, whereas remove_const_t<const int*> evaluates to const int*.
— end example]
template<class T>
struct remove_volatile;
The member typedef type denotes the type formed by removing any top-level volatile-qualifier from T.
[Example 2: 
remove_volatile_t<const volatile int> evaluates to const int, whereas remove_volatile_t<volatile int*> evaluates to volatile int*.
— end example]
template<class T>
struct remove_cv;
The member typedef type denotes the type formed by removing any top-level cv-qualifiers from T.
[Example 3: 
remove_cv_t<const volatile int> evaluates to int, whereas remove_cv_t<const volatile int*> 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 denotes T, otherwise T const.
template<class T>
struct add_volatile;
If T is a reference, function, or top-level volatile-qualified type, then type denotes T, otherwise T volatile.
template<class T>
struct add_cv;
The member typedef type denotes add_const_t<add_volatile_t<T>>.
Table 55: Reference modifications [tab:meta.trans.ref]
Template
Comments
template<class T>
struct remove_reference;
If T has type “reference to T1” then the member typedef type denotes T1; otherwise, type denotes T.
template<class T>
struct add_lvalue_reference;
If T is a referenceable type ([defns.referenceable]) then the member typedef type denotes T&; otherwise, type denotes T.
[Note 1: 
This rule reflects the semantics of reference collapsing ([dcl.ref]).
— end note]
template<class T>
struct add_rvalue_reference;
If T is a referenceable type then the member typedef type denotes T&&; otherwise, type denotes T.
[Note 2: 
This rule reflects the semantics of reference collapsing ([dcl.ref]).
For example, when a type T is a reference type T1&, the type add_rvalue_reference_t<T> is not an rvalue reference.
— end note]
Table 56: Sign modifications [tab:meta.trans.sign]
Template
Comments
template<class T>
struct make_signed;
If T is a (possibly cv-qualified) signed integer type ([basic.fundamental]) then the member typedef type denotes T; otherwise, if T is a (possibly cv-qualified) unsigned integer type then type denotes the corresponding signed integer type, with the same cv-qualifiers as T; otherwise, type denotes the signed integer type with smallest rank ([conv.rank]) for which sizeof(T) == sizeof(type), with the same cv-qualifiers as T.

Mandates: T is an integral or enumeration type other than cv bool.
template<class T>
struct make_unsigned;
If T is a (possibly cv-qualified) unsigned integer type ([basic.fundamental]) then the member typedef type denotes T; otherwise, if T is a (possibly cv-qualified) signed integer type then type denotes the corresponding unsigned integer type, with the same cv-qualifiers as T; otherwise, type denotes the unsigned integer type with smallest rank ([conv.rank]) for which sizeof(T) == sizeof(type), with the same cv-qualifiers as T.

Mandates: T is an integral or enumeration type other than cv bool.
Table 57: Array modifications [tab:meta.trans.arr]
Template
Comments
template<class T>
struct remove_extent;
If T is a type “array of U”, the member typedef type denotes U, otherwise T.
[Note 1: 
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 “multidimensional array of U”, the resulting member typedef type denotes U, otherwise T.
Table 58: Pointer modifications [tab:meta.trans.ptr]
Template
Comments
template<class T>
struct remove_pointer;
If T has type “(possibly cv-qualified) pointer to T1” then the member typedef type denotes T1; otherwise, it denotes T.
template<class T>
struct add_pointer;
If T is a referenceable type ([defns.referenceable]) or a cv void type then the member typedef type denotes remove_reference_t<T>*; otherwise, type denotes T.
Table 59: Other transformations [tab:meta.trans.other]
Template
Comments
template<class T>
struct type_identity;
The member typedef type denotes T.
template<class T>
struct remove_cvref;
The member typedef type denotes remove_cv_t<remove_reference_t<T>>.
template<class T>
struct decay;
Let U be remove_reference_t<T>.
If is_array_v<U> is true, the member typedef type denotes remove_extent_t<U>*.
If is_function_v<U> is true, the member typedef type denotes add_pointer_t<U>.
Otherwise the member typedef type denotes remove_cv_t<U>.
[Note 1: 
This behavior is similar to the lvalue-to-rvalue ([conv.lval]), array-to-pointer ([conv.array]), and function-to-pointer ([conv.func]) conversions applied when an lvalue is used as an rvalue, but also strips cv-qualifiers from class types in order to more closely model by-value argument passing.
— end note]
template<bool B, class T = void> struct enable_if;
If B is true, the member typedef type denotes T; otherwise, there shall be no member type.
template<bool B, class T, class F>
struct conditional;
If B is true, the member typedef type denotes T.
If B is false, the member typedef type denotes F.
template<class... T> struct common_type;
Unless this trait is specialized (as specified in Note B, below), the member type is defined or omitted as specified in Note A, below.
If it is omitted, there shall be no member type.
Each type in the template parameter pack T shall be complete, cv void, or an array of unknown bound.
template<class, class, template<class> class, template<class> class> struct basic_common_reference;
Unless this trait is specialized (as specified in Note D, below), there shall be no member type.
template<class... T> struct common_reference;
The member typedef-name type is defined or omitted as specified in Note C, below.
Each type in the parameter pack T shall be complete or cv void.
template<class T>
struct underlying_type;
If T is an enumeration type, the member typedef type denotes the underlying type of T ([dcl.enum]); otherwise, there is no member type.

Mandates: T is not an incomplete enumeration type.
template<class Fn,
class... ArgTypes>
struct invoke_result;
If the expression INVOKE(declval<Fn>(), declval<ArgTypes>()...) ([func.require]) is well-formed when treated as an unevaluated operand ([expr.context]), the member typedef type denotes the type decltype(INVOKE(declval<Fn>(), declval<ArgTypes>()...)); otherwise, there shall be no member type.
Access checking is performed as if in a context unrelated to Fn and ArgTypes.
Only the validity of the immediate context of the expression is considered.
[Note 2: 
The compilation of the expression can result in side effects such as the instantiation of class template specializations and function template specializations, the generation of implicitly-defined functions, and so on.
Such side effects are not in the “immediate context” and can result in the program being ill-formed.
— end note]
Preconditions: Fn and all types in the template parameter pack ArgTypes are complete types, cv void, or arrays of unknown bound.
template<class T> struct unwrap_reference;
If T is a specialization reference_wrapper<X> for some type X, the member typedef type of unwrap_reference<T> denotes X&, otherwise type denotes T.
template<class T> unwrap_ref_decay;
The member typedef type of unwrap_ref_decay<T> denotes the type unwrap_reference_t<decay_t<T>>.
Table 60: Expressions used to perform ratio arithmetic [tab:ratio.arithmetic]
Type
Value of X
Value of Y
ratio_add<R1, R2>
R1​::​num * R2​::​den +
R1​::​den * R2​::​den
R2​::​num * R1​::​den
ratio_subtract<R1, R2>
R1​::​num * R2​::​den -
R1​::​den * R2​::​den
R2​::​num * R1​::​den
ratio_multiply<R1, R2>
R1​::​num * R2​::​num
R1​::​den * R2​::​den
ratio_divide<R1, R2>
R1​::​num * R2​::​den
R1​::​den * R2​::​num
Table 61: General utilities library summary [tab:utilities.summary]
Subclause
Header
Utility components
<utility>
Pairs
Tuples
<tuple>
Optional objects
<optional>
Variants
<variant>
Storage for any type
<any>
Expected objects
<expected>
Fixed-size sequences of bits
<bitset>
Function objects
<functional>
Type indexes
<typeindex>
Execution policies
<execution>
Primitive numeric conversions
<charconv>
Formatting
<format>
Bit manipulation
<bit>
Debugging
<debugging>
Table 62: optional​::​operator=(const optional&) effects [tab:optional.assign.copy]
*this contains a value
*this does not contain a value
rhs contains a value
assigns *rhs to the contained value
direct-non-list-initializes the contained value with *rhs
rhs does not contain a value
destroys the contained value by calling val->T​::​~T()
no effect
Table 63: optional​::​operator=(optional&&) effects [tab:optional.assign.move]
*this contains a value
*this does not contain a value
rhs contains a value
assigns std​::​move(*rhs) to the contained value
direct-non-list-initializes the contained value with std​::​move(*rhs)
rhs does not contain a value
destroys the contained value by calling val->T​::​~T()
no effect
Table 64: optional​::​operator=(const optional<U>&) effects [tab:optional.assign.copy.templ]
*this contains a value
*this does not contain a value
rhs contains a value
assigns *rhs to the contained value
direct-non-list-initializes the contained value with *rhs
rhs does not contain a value
destroys the contained value by calling val->T​::​~T()
no effect
Table 65: optional​::​operator=(optional<U>&&) effects [tab:optional.assign.move.templ]
*this contains a value
*this does not contain a value
rhs contains a value
assigns std​::​move(*rhs) to the contained value
direct-non-list-initializes the contained value with std​::​move(*rhs)
rhs does not contain a value
destroys the contained value by calling val->T​::​~T()
no effect
Table 66: optional​::​swap(optional&) effects [tab:optional.swap]
*this contains a value
*this does not contain a value
rhs contains a value
calls swap(*(*this), *rhs)
direct-non-list-initializes the contained value of *this with std​::​move(*rhs), followed by rhs.val->T​::​~T(); postcondition is that *this contains a value and rhs does not contain a value
rhs does not contain a value
direct-non-list-initializes the contained value of rhs with std​::​move(*(*this)), followed by val->T​::​~T(); postcondition is that *this does not contain a value and rhs contains a value
no effect
Table 67: swap(expected&) effects [tab:expected.object.swap]
this->has_value()
!this->has_value()
rhs.has_value()
equivalent to: using std​::​swap; swap(val, rhs.val);
calls rhs.swap(*this)
!rhs.has_value()
see below
equivalent to: using std​::​swap; swap(unex, rhs.unex);
Table 68: swap(expected&) effects [tab:expected.void.swap]
this->has_value()
!this->has_value()
rhs.has_value()
no effects
calls rhs.swap(*this)
!rhs.has_value()
see below
equivalent to: using std​::​swap; swap(unex, rhs.unex);
Table 69: Meaning of align options [tab:format.align]
Option
Meaning
<
Forces the formatted argument to be aligned to the start of the field by inserting n fill characters after the formatted argument where n is the padding width.
This is the default for non-arithmetic non-pointer types, charT, and bool, unless an integer presentation type is specified.
>
Forces the formatted argument to be aligned to the end of the field by inserting n fill characters before the formatted argument where n is the padding width.
This is the default for arithmetic types other than charT and bool, pointer types, or when an integer presentation type is specified.
^
Forces the formatted argument to be centered within the field by inserting fill characters before and fill characters after the formatted argument, where n is the padding width.
Table 70: Meaning of sign options [tab:format.sign]
Option
Meaning
+
Indicates that a sign should be used for both non-negative and negative numbers.
The + sign is inserted before the output of to_chars for non-negative numbers other than negative zero.
[Note 5: 
For negative numbers and negative zero the output of to_chars will already contain the sign so no additional transformation is performed.
— end note]
-
Indicates that a sign should be used for negative numbers and negative zero only (this is the default behavior).
space
Indicates that a leading space should be used for non-negative numbers other than negative zero, and a minus sign for negative numbers and negative zero.
Table 71: Meaning of type options for strings [tab:format.type.string]
Type
Meaning
none, s
Copies the string to the output.
?
Copies the escaped string ([format.string.escaped]) to the output.
Table 72: Meaning of type options for integer types [tab:format.type.int]
Type
Meaning
b
to_chars(first, last, value, 2); the base prefix is 0b.
B
The same as b, except that the base prefix is 0B.
c
Copies the character static_cast<charT>(value) to the output.
Throws format_error if value is not in the range of representable values for charT.
d
to_chars(first, last, value).
o
to_chars(first, last, value, 8); the base prefix is 0 if value is nonzero and is empty otherwise.
x
to_chars(first, last, value, 16); the base prefix is 0x.
X
The same as x, except that it uses uppercase letters for digits above 9 and the base prefix is 0X.
none
The same as d.
[Note 8: 
If the formatting argument type is charT or bool, the default is instead c or s, respectively.
— end note]
Table 73: Meaning of type options for charT[tab:format.type.char]
Type
Meaning
none, c
Copies the character to the output.
b, B, d, o, x, X
As specified in Table 72 with value converted to the unsigned version of the underlying type.
?
Copies the escaped character ([format.string.escaped]) to the output.
Table 74: Meaning of type options for bool[tab:format.type.bool]
Type
Meaning
none, s
Copies textual representation, either true or false, to the output.
b, B, d, o, x, X
As specified in Table 72 for the value static_cast<unsigned char>(value).
Table 75: Meaning of type options for floating-point types [tab:format.type.float]
Type
Meaning
a
If precision is specified, equivalent to to_chars(first, last, value, chars_format::hex, precision) where precision is the specified formatting precision; equivalent to to_chars(first, last, value, chars_format::hex) otherwise.
A
The same as a, except that it uses uppercase letters for digits above 9 and P to indicate the exponent.
e
Equivalent to to_chars(first, last, value, chars_format::scientific, precision) where precision is the specified formatting precision, or 6 if precision is not specified.
E
The same as e, except that it uses E to indicate exponent.
f, F
Equivalent to to_chars(first, last, value, chars_format::fixed, precision) where precision is the specified formatting precision, or 6 if precision is not specified.
g
Equivalent to to_chars(first, last, value, chars_format::general, precision) where precision is the specified formatting precision, or 6 if precision is not specified.
G
The same as g, except that it uses E to indicate exponent.
none
If precision is specified, equivalent to to_chars(first, last, value, chars_format::general, precision) where precision is the specified formatting precision; equivalent to to_chars(first, last, value) otherwise.
Table 76: Meaning of type options for pointer types [tab:format.type.ptr]
Type
Meaning
none, p
If uintptr_t is defined, to_chars(first, last, reinterpret_cast<uintptr_t>(value), 16) with the prefix 0x inserted immediately before the output of to_chars; otherwise, implementation-defined.
P
The same as p, except that it uses uppercase letters for digits above 9 and the base prefix is 0X.
Table 77: BasicFormatter requirements [tab:formatter.basic]
Expression
Return type
Requirement
g.parse(pc)
PC​::​iterator
Parses format-spec ([format.string]) for type T in the range [pc.begin(), pc.end()) until the first unmatched character.
Throws format_error unless the whole range is parsed or the unmatched character is }.
[Note 1: 
This allows formatters to emit meaningful error messages.
— end note]
Stores the parsed format specifiers in *this and returns an iterator past the end of the parsed range.
f.format(u, fc)
FC​::​iterator
Formats u according to the specifiers stored in *this, writes the output to fc.out(), and returns an iterator past the end of the output range.
The output shall only depend on u, fc.locale(), fc.arg(n) for any value n of type size_t, and the range [pc.begin(), pc.end()) from the last call to f.parse(pc).
Table 78: Formatter requirements [tab:formatter]
Expression
Return type
Requirement
f.format(t, fc)
FC​::​iterator
Formats t according to the specifiers stored in *this, writes the output to fc.out(), and returns an iterator past the end of the output range.
The output shall only depend on t, fc.locale(), fc.arg(n) for any value n of type size_t, and the range [pc.begin(), pc.end()) from the last call to f.parse(pc).
f.format(u, fc)
FC​::​iterator
As above, but does not modify u.
Table 79: Mapping of characters to escape sequences [tab:format.escape.sequences]
Character
Escape sequence
U+0009 character tabulation
\t
U+000a line feed
\n
U+000d carriage return
\r
U+0022 quotation mark
\"
U+005c reverse solidus
\\
Table 80: Meaning of range-type options [tab:formatter.range.type]
Option
Requirements
Meaning
m
T shall be either a specialization of pair or a specialization of tuple such that tuple_size_v<T> is 2.
Indicates that the opening bracket should be "{", the closing bracket should be "}", the separator should be ", ", and each range element should be formatted as if m were specified for its tuple-type.
[Note 2: 
If the n option is provided in addition to the m option, both the opening and closing brackets are still empty.
— end note]
s
T shall be charT.
Indicates that the range should be formatted as a string.
?s
T shall be charT.
Indicates that the range should be formatted as an escaped string ([format.string.escaped]).
Table 81: Meaning of tuple-type options [tab:formatter.tuple.type]
Option
Requirements
Meaning
m
sizeof...(Ts) == 2
Equivalent to: set_separator(STATICALLY-WIDEN<charT>(": ")); set_brackets({}, {});
n
none
Equivalent to: set_brackets({}, {});
none
none
No effects
Table 82: Strings library summary [tab:strings.summary]
Subclause
Header
Character traits
<string>
String view classes
<string_view>
String classes
<string>
Null-terminated sequence utilities
<cctype>, <cstdlib>, <cstring>, <cuchar>, <cwchar>, <cwctype>
Table 83: Character traits requirements [tab:char.traits.req]
Expression
Return type
Assertion/note
Complexity
pre-/post-condition
X​::​char_type
C
compile-time
X​::​int_type
(described in [char.traits.typedefs])
compile-time
X​::​off_type
compile-time
X​::​pos_type
compile-time
X​::​state_type
(described in [char.traits.typedefs])
compile-time
X​::​eq(c,d)
bool
Returns: whether c is to be treated as equal to d.
constant
X​::​lt(c,d)
bool
Returns: whether c is to be treated as less than d.
constant
X​::​compare(p,q,n)
int
Returns: 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)
size_t
Returns: the smallest i such that X​::​eq(p[i],charT()) is true.
linear
X​::​find(p,n,c)
const X​::​char_type*
Returns: the smallest q in [p,p+n) such that X​::​eq(*q,c) is true, nullptr 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.

Returns: s.
linear
X​::​copy(s,p,n)
X​::​char_type*
Preconditions: The ranges [p, p+n) and [s, s+n) do not overlap.
Returns: 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).

Returns: s.
linear
X​::​not_eof(e)
int_type
Returns: 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
Returns: 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
Returns: some value e, constrained by the definitions of to_char_type and eq_int_type.
constant
X​::​eq_int_type(e,f)
bool
Returns: 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
Returns: a value e such that X​::​eq_int_type(e,X​::​to_int_type(c)) is false for all values c.
constant
Table 84: compare() results [tab:string.view.compare]
Condition
Return Value
size() < str.size()
< 0
size() == str.size()
 0
size() > str.size()
> 0
Table 85: Containers library summary [tab:containers.summary]
Subclause
Header
Requirements
Sequence containers
<array>, <deque>, <forward_list>, <list>, <vector>
Associative containers
<map>, <set>
Unordered associative containers
<unordered_map>, <unordered_set>
Container adaptors
<queue>, <stack>, <flat_map>, <flat_set>
Views
<span>, <mdspan>
Table 86: Container types with compatible nodes [tab:container.node.compat]
map<K, T, C1, A>
map<K, T, C2, A>
map<K, T, C1, A>
multimap<K, T, C2, A>
set<K, C1, A>
set<K, C2, A>
set<K, C1, A>
multiset<K, C2, A>
unordered_map<K, T, H1, E1, A>
unordered_map<K, T, H2, E2, A>
unordered_map<K, T, H1, E1, A>
unordered_multimap<K, T, H2, E2, A>
unordered_set<K, H1, E1, A>
unordered_set<K, H2, E2, A>
unordered_set<K, H1, E1, A>
unordered_multiset<K, H2, E2, A>
Table 87: Iterators library summary [tab:iterators.summary]
Subclause
Header
Iterator requirements
<iterator>
Iterator primitives
Iterator adaptors
Stream iterators
Range access
Table 88: Relations among iterator categories [tab:iterators.relations]
Contiguous
Random Access
Bidirectional
Forward
Input
Output
Table 89: Cpp17Iterator requirements [tab:iterator]
Expression
Return type
Operational
Assertion/note
semantics
pre-/post-condition
*r
unspecified
Preconditions: r is dereferenceable.
++r
X&
Table 90: Cpp17InputIterator requirements (in addition to Cpp17Iterator) [tab:inputiterator]
Expression
Return type
Operational
Assertion/note
semantics
pre-/post-condition
a != b
decltype(a != b) models boolean-testable
!(a == b)
Preconditions: (a, b) is in the domain of ==.
*a
reference, convertible to T
Preconditions: 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
Preconditions: a is dereferenceable.
++r
X&
Preconditions: r is dereferenceable.

Postconditions: r is dereferenceable or r is past-the-end;
any copies of the previous value of r are no longer required to be dereferenceable nor to be in the domain of ==.
(void)r++
equivalent to (void)++r
*r++
convertible to T
{ T tmp = *r;
++r;
return tmp; }
Table 91: Cpp17OutputIterator requirements (in addition to Cpp17Iterator) [tab:outputiterator]
Expression
Return type
Operational
Assertion/note
semantics
pre-/post-condition
*r = o
result is not used
Remarks: After this operation r is not required to be dereferenceable.

Postconditions: r is incrementable.
++r
X&
addressof(r) == addressof(++r).

Remarks: After this operation r is not required to be dereferenceable.

Postconditions: r is incrementable.
r++
convertible to const X&
{ X tmp = r;
++r;
return tmp; }
Remarks: After this operation r is not required to be dereferenceable.

Postconditions: r is incrementable.
*r++ = o
result is not used
Remarks: After this operation r is not required to be dereferenceable.

Postconditions: r is incrementable.
Table 92: Cpp17ForwardIterator requirements (in addition to Cpp17InputIterator) [tab:forwarditerator]
Expression
Return type
Operational
Assertion/note
semantics
pre-/post-condition
r++
convertible to const X&
{ X tmp = r;
++r;
return tmp; }
*r++
reference
Table 93: Cpp17BidirectionalIterator requirements (in addition to Cpp17ForwardIterator) [tab:bidirectionaliterator]
Expression
Return type
Operational
Assertion/note
semantics
pre-/post-condition
--r
X&
Preconditions: there exists s such that r == ++s.

Postconditions: r is dereferenceable.

--(++r) == r.

--r == --s implies r == s.

addressof(r) == addressof(--r).
r--
convertible to const X&
{ X tmp = r;
--r;
return tmp; }
*r--
reference
Table 94: Cpp17RandomAccessIterator requirements (in addition to Cpp17BidirectionalIterator) [tab:randomaccessiterator]
Expression
Return type
Operational
Assertion/note
semantics
pre-/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;
Preconditions: the absolute value of n is in the range of representable values of difference_type.
a - n
X
{ X tmp = a;
return tmp -= n; }
b - a
difference_type
return n;
Preconditions: 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
decltype(a < b) models boolean-testable
Effects: Equivalent to: return b - a > 0;
< is a total ordering relation
a > b
decltype(a > b) models boolean-testable
b < a
> is a total ordering relation opposite to <.
a >= b
decltype(a >= b) models boolean-testable
!(a < b)
a <= b
decltype(a <= b) models boolean-testable
!(a > b)
Table 95: Ranges library summary [tab:range.summary]
Subclause
Header
Range access
<ranges>
Requirements
Range utilities
Range factories
Range adaptors
Range generators
Table 96: Algorithms library summary [tab:algorithms.summary]
Subclause
Header
Algorithms requirements
Parallel algorithms
Algorithm result types
<algorithm>
Non-modifying sequence operations
Mutating sequence operations
Sorting and related operations
Generalized numeric operations
<numeric>
Specialized <memory> algorithms
<memory>
Specialized <random> algorithms
<random>
C library algorithms
<cstdlib>
Table 97: Numerics library summary [tab:numerics.summary]
Subclause
Header
Requirements
Floating-point environment
<cfenv>
Complex numbers
<complex>
Random number generation
<random>
Numeric arrays
<valarray>
Mathematical functions for floating-point types
<cmath>, <cstdlib>
Numbers
<numbers>
Linear algebra
<linalg>
Table 98: Seed sequence requirements [tab:rand.req.seedseq]
Expression
Return type
Pre/post-condition
Complexity
S​::​result_type
T
T is an unsigned integer type 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).
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.
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.
Table 99: Random number engine requirements [tab:rand.req.eng]
Expression
Return type
Pre/post-condition
Complexity
E()
Creates an engine with the same initial state as all other default-constructed engines of type E.
E(x)
Creates an engine that compares equal to x.
E(s)
Creates an engine with initial state determined by s.
E(q)221
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
Postconditions: e == E().
same as E()
e.seed(s)
void
Postconditions: e == E(s).
same as E(s)
e.seed(q)
void
Postconditions: e == E(q).
same as E(q)
e()
T
Advances e's state e to e e) and returns GA(e).
e.discard(z)222
void
Advances e's state e to 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 and as the infinite sequences of values that would be generated by repeated future calls to x() and y(), respectively, returns true if ; else returns false.
x != y
bool
!(x == y).
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.
Postconditions: The os.fmtflags and fill character are unchanged.
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_base​::​failbit) (which may throw ios_base​::​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.
Preconditions: 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.
Postconditions: The is.fmtflags are unchanged.
Table 100: Random number distribution requirements [tab:rand.req.dist]
Expression
Return type
Pre/post-condition
Complexity
D​::​result_type
T
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
Postconditions: d.param() == p.
no worse than the complexity of D(p)
d(g)
T
With , the sequence of numbers returned by successive invocations with the same object g is randomly distributed according to the associated p(z|{p}) or 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 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 , where and 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.
Postconditions: 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_base​::​failbit) (which may throw ios_base​::​failure ([iostate.flags])).
Preconditions: 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.
Postconditions: The is.fmtflags are unchanged.
Table 101: Time library summary [tab:time.summary]
Subclause
Header
Cpp17Clock requirements
Time-related traits
<chrono>
Class template duration
Class template time_point
Clocks
Civil calendar
Class template hh_mm_ss
12/24 hour functions
Time zones
Formatting
Parsing
Hash support
C library time utilities
<ctime>
Table 102: Cpp17Clock requirements [tab:time.clock]
Expression
Return type
Operational 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.
Table 103: Examples for fractional_width[tab:time.hms.width]
Duration
fractional_width
Formatted fractional second output
hours, minutes, and seconds
0
milliseconds
3
0.001
microseconds
6
0.000001
nanoseconds
9
0.000000001
duration<int, ratio<1, 2>>
1
0.5
duration<int, ratio<1, 3>>
6
0.333333
duration<int, ratio<1, 4>>
2
0.25
duration<int, ratio<1, 5>>
1
0.2
duration<int, ratio<1, 6>>
6
0.166666
duration<int, ratio<1, 7>>
6
0.142857
duration<int, ratio<1, 8>>
3
0.125
duration<int, ratio<1, 9>>
6
0.111111
duration<int, ratio<1, 10>>
1
0.1
duration<int, ratio<756, 625>>
4
0.2096
Table 104: Meaning of conversion specifiers [tab:time.format.spec]
Specifier
Replacement
%a
The locale's abbreviated weekday name.
If the value does not contain a valid weekday, an exception of type format_error is thrown.
%A
The locale's full weekday name.
If the value does not contain a valid weekday, an exception of type format_error is thrown.
%b
The locale's abbreviated month name.
If the value does not contain a valid month, an exception of type format_error is thrown.
%B
The locale's full month name.
If the value does not contain a valid month, an exception of type format_error is thrown.
%c
The locale's date and time representation.
The modified command %Ec produces the locale's alternate date and time representation.
%C
The year divided by 100 using floored division.
If the result is a single decimal digit, it is prefixed with 0.
The modified command %EC produces the locale's alternative representation of the century.
%d
The day of month as a decimal number.
If the result is a single decimal digit, it is prefixed with 0.
The modified command %Od produces the locale's alternative representation.
%D
Equivalent to %m/%d/%y.
%e
The day of month as a decimal number.
If the result is a single decimal digit, it is prefixed with a space.
The modified command %Oe produces the locale's alternative representation.
%F
Equivalent to %Y-%m-%d.
%g
The last two decimal digits of the ISO week-based year.
If the result is a single digit it is prefixed by 0.
%G
The ISO week-based year as a decimal number.
If the result is less than four digits it is left-padded with 0 to four digits.
%h
Equivalent to %b.
%H
The hour (24-hour clock) as a decimal number.
If the result is a single digit, it is prefixed with 0.
The modified command %OH produces the locale's alternative representation.
%I
The hour (12-hour clock) as a decimal number.
If the result is a single digit, it is prefixed with 0.
The modified command %OI produces the locale's alternative representation.
%j
If the type being formatted is a specialization of duration, the decimal number of days without padding.
Otherwise, the day of the year as a decimal number.
Jan 1 is 001.
If the result is less than three digits, it is left-padded with 0 to three digits.
%m
The month as a decimal number.
Jan is 01.
If the result is a single digit, it is prefixed with 0.
The modified command %Om produces the locale's alternative representation.
%M
The minute as a decimal number.
If the result is a single digit, it is prefixed with 0.
The modified command %OM produces the locale's alternative representation.
%n
A new-line character.
%p
The locale's equivalent of the AM/PM designations associated with a 12-hour clock.
%q
The duration's unit suffix as specified in [time.duration.io].
%Q
The duration's numeric value (as if extracted via .count()).
%r
The locale's 12-hour clock time.
%R
Equivalent to %H:%M.
%S
Seconds as a decimal number.
If the number of seconds is less than 10, the result is prefixed with 0.
If the precision of the input cannot be exactly represented with seconds, then the format is a decimal floating-point number with a fixed format and a precision matching that of the precision of the input (or to a microseconds precision if the conversion to floating-point decimal seconds cannot be made within 18 fractional digits).
The character for the decimal point is localized according to the locale.
The modified command %OS produces the locale's alternative representation.
%t
A horizontal-tab character.
%T
Equivalent to %H:%M:%S.
%u
The ISO weekday as a decimal number (1-7), where Monday is 1.
The modified command %Ou produces the locale's alternative representation.
%U
The week number of the year as a decimal number.
The first Sunday of the year is the first day of week 01.
Days of the same year prior to that are in week 00.
If the result is a single digit, it is prefixed with 0.
The modified command %OU produces the locale's alternative representation.
%V
The ISO week-based week number as a decimal number.
If the result is a single digit, it is prefixed with 0.
The modified command %OV produces the locale's alternative representation.
%w
The weekday as a decimal number (0-6), where Sunday is 0.
The modified command %Ow produces the locale's alternative representation.
%W
The week number of the year as a decimal number.
The first Monday of the year is the first day of week 01.
Days of the same year prior to that are in week 00.
If the result is a single digit, it is prefixed with 0.
The modified command %OW produces the locale's alternative representation.
%x
The locale's date representation.
The modified command %Ex produces the locale's alternate date representation.
%X
The locale's time representation.
The modified command %EX produces the locale's alternate time representation.
%y
The last two decimal digits of the year.
If the result is a single digit it is prefixed by 0.
The modified command %Oy produces the locale's alternative representation.
The modified command %Ey produces the locale's alternative representation of offset from %EC (year only).
%Y
The year as a decimal number.
If the result is less than four digits it is left-padded with 0 to four digits.
The modified command %EY produces the locale's alternative full year representation.
%z
The offset from UTC as specified in ISO 8601-1:2019, subclause 5.3.4.1.
For example -0430 refers to 4 hours 30 minutes behind UTC.
If the offset is zero, +0000 is used.
The modified commands %Ez and %Oz insert a : between the hours and minutes: -04:30.
If the offset information is not available, an exception of type format_error is thrown.
%Z
The time zone abbreviation.
If the time zone abbreviation is not available, an exception of type format_error is thrown.
%%
A % character.
Table 105: Meaning of parse flags [tab:time.parse.spec]
Flag
Parsed value
%a
The locale's full or abbreviated case-insensitive weekday name.
%A
Equivalent to %a.
%b
The locale's full or abbreviated case-insensitive month name.
%B
Equivalent to %b.
%c
The locale's date and time representation.
The modified command %Ec interprets the locale's alternate date and time representation.
%C
The century as a decimal number.
The modified command %NC specifies the maximum number of characters to read.
If N is not specified, the default is 2.
Leading zeroes are permitted but not required.
The modified command %EC interprets the locale's alternative representation of the century.
%d
The day of the month as a decimal number.
The modified command %Nd specifies the maximum number of characters to read.
If N is not specified, the default is 2.
Leading zeroes are permitted but not required.
The modified command %Od interprets the locale's alternative representation of the day of the month.
%D
Equivalent to %m/%d/%y.
%e
Equivalent to %d and can be modified like %d.
%F
Equivalent to %Y-%m-%d.
If modified with a width N, the width is applied to only %Y.
%g
The last two decimal digits of the ISO week-based year.
The modified command %Ng specifies the maximum number of characters to read.
If N is not specified, the default is 2.
Leading zeroes are permitted but not required.
%G
The ISO week-based year as a decimal number.
The modified command %NG specifies the maximum number of characters to read.
If N is not specified, the default is 4.
Leading zeroes are permitted but not required.
%h
Equivalent to %b.
%H
The hour (24-hour clock) as a decimal number.
The modified command %NH specifies the maximum number of characters to read.
If N is not specified, the default is 2.
Leading zeroes are permitted but not required.
The modified command %OH interprets the locale's alternative representation.
%I
The hour (12-hour clock) as a decimal number.
The modified command %NI specifies the maximum number of characters to read.
If N is not specified, the default is 2.
Leading zeroes are permitted but not required.
The modified command %OI interprets the locale's alternative representation.
%j
If the type being parsed is a specialization of duration, a decimal number of days.
Otherwise, the day of the year as a decimal number.
Jan 1 is 1.
In either case, the modified command %Nj specifies the maximum number of characters to read.
If N is not specified, the default is 3.
Leading zeroes are permitted but not required.
%m
The month as a decimal number.
Jan is 1.
The modified command %Nm specifies the maximum number of characters to read.
If N is not specified, the default is 2.
Leading zeroes are permitted but not required.
The modified command %Om interprets the locale's alternative representation.
%M
The minutes as a decimal number.
The modified command %NM specifies the maximum number of characters to read.
If N is not specified, the default is 2.
Leading zeroes are permitted but not required.
The modified command %OM interprets the locale's alternative representation.
%n
Matches one whitespace character.
[Note 1: 
%n, %t, and a space can be combined to match a wide range of whitespace patterns.
For example, "%n " matches one or more whitespace characters, and "%n%t%t" matches one to three whitespace characters.
— end note]
%p
The locale's equivalent of the AM/PM designations associated with a 12-hour clock.
%r
The locale's 12-hour clock time.
%R
Equivalent to %H:%M.
%S
The seconds as a decimal number.
The modified command %NS specifies the maximum number of characters to read.
If N is not specified, the default is 2 if the input time has a precision convertible to seconds.
Otherwise the default width is determined by the decimal precision of the input and the field is interpreted as a long double in a fixed format.
If encountered, the locale determines the decimal point character.
Leading zeroes are permitted but not required.
The modified command %OS interprets the locale's alternative representation.
%t
Matches zero or one whitespace characters.
%T
Equivalent to %H:%M:%S.
%u
The ISO weekday as a decimal number (1-7), where Monday is 1.
The modified command %Nu specifies the maximum number of characters to read.
If N is not specified, the default is 1.
Leading zeroes are permitted but not required.
%U
The week number of the year as a decimal number.
The first Sunday of the year is the first day of week 01.
Days of the same year prior to that are in week 00.
The modified command %NU specifies the maximum number of characters to read.
If N is not specified, the default is 2.
Leading zeroes are permitted but not required.
The modified command %OU interprets the locale's alternative representation.
%V
The ISO week-based week number as a decimal number.
The modified command %NV specifies the maximum number of characters to read.
If N is not specified, the default is 2.
Leading zeroes are permitted but not required.
%w
The weekday as a decimal number (0-6), where Sunday is 0.
The modified command %Nw specifies the maximum number of characters to read.
If N is not specified, the default is 1.
Leading zeroes are permitted but not required.
The modified command %Ow interprets the locale's alternative representation.
%W
The week number of the year as a decimal number.
The first Monday of the year is the first day of week 01.
Days of the same year prior to that are in week 00.
The modified command %NW specifies the maximum number of characters to read.
If N is not specified, the default is 2.
Leading zeroes are permitted but not required.
The modified command %OW interprets the locale's alternative representation.
%x
The locale's date representation.
The modified command %Ex interprets the locale's alternate date representation.
%X
The locale's time representation.
The modified command %EX interprets the locale's alternate time representation.
%y
The last two decimal digits of the year.
If the century is not otherwise specified (e.g., with %C), values in the range [69, 99] are presumed to refer to the years 1969 to 1999, and values in the range [00, 68] are presumed to refer to the years 2000 to 2068.
The modified command %Ny specifies the maximum number of characters to read.
If N is not specified, the default is 2.
Leading zeroes are permitted but not required.
The modified commands %Ey and %Oy interpret the locale's alternative representation.
%Y
The year as a decimal number.
The modified command %NY specifies the maximum number of characters to read.
If N is not specified, the default is 4.
Leading zeroes are permitted but not required.
The modified command %EY interprets the locale's alternative representation.
%z
The offset from UTC in the format [+|-]hh[mm].
For example -0430 refers to 4 hours 30 minutes behind UTC, and 04 refers to 4 hours ahead of UTC.
The modified commands %Ez and %Oz parse a : between the hours and minutes and render leading zeroes on the hour field optional: [+|-]h[h][:mm].
For example -04:30 refers to 4 hours 30 minutes behind UTC, and 4 refers to 4 hours ahead of UTC.
%Z
The time zone abbreviation or name.
A single word is parsed.
This word can only contain characters from the basic character set ([lex.charset]) that are alphanumeric, or one of '_', '/', '-', or '+'.
%%
A % character is extracted.
Table 106: Localization library summary [tab:localization.summary]
Subclause
Header
Locales
<locale>
Standard locale categories
C library locales
<clocale>
Text encodings identification
<text_encoding>
Table 107: Locale category facets [tab:locale.category.facets]
Category
Includes facets
collate
collate<char>, collate<wchar_t>
ctype
ctype<char>, ctype<wchar_t>
codecvt<char, 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>
Table 108: Required specializations [tab:locale.spec]
Category
Includes 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<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>
Table 109: do_in/do_out result values [tab:locale.codecvt.inout]
Value
Meaning
ok
completed the conversion
partial
not all source characters converted
error
encountered a character in [from, from_end) that cannot be converted
noconv
internT and externT are the same type, and input sequence is identical to converted sequence
Table 110: do_unshift result values [tab:locale.codecvt.unshift]
Value
Meaning
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
Table 111: Integer conversions [tab:facet.num.get.int]
State
stdio equivalent
basefield == oct
%o
basefield == hex
%X
basefield == 0
%i
signed integral type
%d
unsigned integral type
%u
Table 112: Length modifier [tab:facet.num.get.length]
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
Table 113: Integer conversions [tab:facet.num.put.int]
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
Table 114: Floating-point conversions [tab:facet.num.put.fp]
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
Table 115: Length modifier [tab:facet.num.put.length]
Type
Length modifier
long
l
long long
ll
unsigned long
l
unsigned long long
ll
long double
L
otherwise
none
Table 116: Numeric conversions [tab:facet.num.put.conv]
Type(s)
State
stdio equivalent
an integral type
showpos
+
showbase
#
a floating-point type
showpos
+
showpoint
#
Table 117: Fill padding [tab:facet.num.put.fill]
State
Location
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
Table 118: do_get_date effects [tab:locale.time.get.dogetdate]
date_order()
Format
no_order
"%m%d%y"
dmy
"%d%m%y"
mdy
"%m%d%y"
ymd
"%y%m%d"
ydm
"%y%d%m"
Table 119: Potential setlocale data races [tab: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
Table 120: Input/output library summary [tab:iostreams.summary]
Subclause
Header
Requirements
Forward declarations
<iosfwd>
Standard iostream objects
<iostream>
Iostreams base classes
<ios>
Stream buffers
<streambuf>
Formatting and manipulators
<istream>, <ostream>, <iomanip>, <print>
String streams
<sstream>
Span-based streams
<spanstream>
File streams
<fstream>
Synchronized output streams
<syncstream>
File systems
<filesystem>
C library files
<cstdio>, <cinttypes>
Table 121: fmtflags effects [tab:ios.fmtflags]
Element
Effect(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
Table 122: fmtflags constants [tab:ios.fmtflags.const]
Constant
Allowable values
adjustfield
left | right | internal
basefield
dec | oct | hex
floatfield
scientific | fixed
Table 123: iostate effects [tab:ios.iostate]
Element
Effect(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.
Table 124: openmode effects [tab:ios.openmode]
Element
Effect(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
noreplace
open in exclusive mode
out
open for output
trunc
truncate an existing stream when opening
Table 125: seekdir effects [tab:ios.seekdir]
Element
Meaning
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
Table 126: Position type requirements [tab:fpos.operations]
Expression
Return type
Operational
Assertion/note
semantics
pre-/post-condition
P(o)
P
converts from offset
Effects: Value-initializes the state object.
P p(o);
P p = o;
Effects: Value-initializes the state object.

Postconditions: p == P(o) is true.
P()
P
P(0)
P p;
P p(0);
O(p)
streamoff
converts to offset
P(O(p)) == p
p == q
bool
Remarks: For any two values o and o2, if p is obtained from o converted to P or from a copy of such P value and if q is obtained from o2 converted to P or from a copy of such P value, then p == q is true only if o == o2 is true.
p != q
bool
!(p == q)
p + o
P
+ offset
Remarks: With ql = p + o;, then: ql - o == p
pl += o
P&
+= offset
Remarks: With ql = pl; before the +=, then: pl - o == ql
p - o
P
- offset
Remarks: With ql = p - o;, then: ql + o == p
pl -= o
P&
-= offset
Remarks: With ql = pl; before the -=, then: pl + o == ql
o + p
convertible to P
p + o
P(o + p) == p + o
p - q
streamoff
distance
p == q + (p - q)
Table 127: basic_ios​::​init() effects [tab:basic.ios.cons]
Element
Value
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
Table 128: basic_ios​::​copyfmt() effects [tab:basic.ios.copyfmt]
Element
Value
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()
Table 129: seekoff positioning [tab:stringbuf.seekoff.pos]
Conditions
Result
ios_base​::​in is set in which
positions the input sequence
ios_base​::​out is set in which
positions the output sequence
both ios_base​::​in and ios_base​::​out are set in which and either
way == ios_base​::​beg or
way == ios_base​::​end
positions both the input and the output sequences
Otherwise
the positioning operation fails.
Table 130: newoff values [tab:stringbuf.seekoff.newoff]
Condition
newoff 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).
Table 131: File open modes [tab:filebuf.open.modes]
ios_base flag combination
stdio equivalent
binary
in
out
trunc
app
noreplace
+
"w"
+
+
"wx"
+
+
"w"
+
+
+
"wx"
+
+
"a"
+
"a"
+
"r"
+
+
"r+"
+
+
+
"w+"
+
+
+
+
"w+x"
+
+
+
"a+"
+
+
"a+"
+
+
"wb"
+
+
+
"wbx"
+
+
+
"wb"
+
+
+
+
"wbx"
+
+
+
"ab"
+
+
"ab"
+
+
"rb"
+
+
+
"r+b"
+
+
+
+
"w+b"
+
+
+
+
+
"w+bx"
+
+
+
+
"a+b"
+
+
+
"a+b"
Table 132: seekoff effects [tab:filebuf.seekoff]
way Value
stdio Equivalent
basic_ios​::​beg
SEEK_SET
basic_ios​::​cur
SEEK_CUR
basic_ios​::​end
SEEK_END
Table 133: Enum path​::​format[tab:fs.enum.path.format]
Name
Meaning
native_format
The native pathname format.
generic_format
The generic pathname format.
auto_format
The interpretation of the format of the character sequence is implementation-defined.
The implementation may inspect the content of the character sequence to determine the format.
Recommended practice: For POSIX-based systems, native and generic formats are equivalent and the character sequence should always be interpreted in the same way.
Table 134: Enum class file_type[tab:fs.enum.file.type]
Constant
Meaning
none
The type of the file has not been determined or an error occurred while trying to determine the type.
not_found
Pseudo-type indicating the file was not found.
[Note 1: 
The file not being found is not considered an error while determining the type of a file.
— end note]
regular
Regular file
directory
Directory file
symlink
Symbolic link file
block
Block special file
character
Character special file
fifo
FIFO or pipe file
socket
Socket file
implementation-defined
Implementations that support file systems having file types in addition to the above file_type types shall supply implementation-defined file_type constants to separately identify each of those additional file types
unknown
The file exists but the type cannot be determined
Table 135: Enum class copy_options[tab:fs.enum.copy.opts]
Option group controlling copy_file function effects for existing target files
Constant
Meaning
none
(Default) Error; file already exists.
skip_existing
Do not overwrite existing file, do not report an error.
overwrite_existing
Overwrite the existing file.
update_existing
Overwrite the existing file if it is older than the replacement file.
Option group controlling copy function effects for subdirectories
Constant
Meaning
none
(Default) Do not copy subdirectories.
recursive
Recursively copy subdirectories and their contents.
Option group controlling copy function effects for symbolic links
Constant
Meaning
none
(Default) Follow symbolic links.
copy_symlinks
Copy symbolic links as symbolic links rather than copying the files that they point to.
skip_symlinks
Ignore symbolic links.
Option group controlling copy function effects for choosing the form of copying
Constant
Meaning
none
(Default) Copy content.
directories_only
Copy directory structure only, do not copy non-directory files.
create_symlinks
Make symbolic links instead of copies of files.
The source path shall be an absolute path unless the destination path is in the current directory.
create_hard_links
Make hard links instead of copies of files.
Table 136: Enum class perms[tab:fs.enum.perms]
Name
Value
POSIX
Definition or notes
(octal)
macro
none
0
There are no permissions set for the file.
owner_read
0400
S_IRUSR
Read permission, owner
owner_write
0200
S_IWUSR
Write permission, owner
owner_exec
0100
S_IXUSR
Execute/search permission, owner
owner_all
0700
S_IRWXU
Read, write, execute/search by owner;
owner_read | owner_write | owner_exec
group_read
040
S_IRGRP
Read permission, group
group_write
020
S_IWGRP
Write permission, group
group_exec
010
S_IXGRP
Execute/search permission, group
group_all
070
S_IRWXG
Read, write, execute/search by group;
group_read | group_write | group_exec
others_read
04
S_IROTH
Read permission, others
others_write
02
S_IWOTH
Write permission, others
others_exec
01
S_IXOTH
Execute/search permission, others
others_all
07
S_IRWXO
Read, write, execute/search by others;
others_read | others_write | others_exec
all
0777
owner_all | group_all | others_all
set_uid
04000
S_ISUID
Set-user-ID on execution
set_gid
02000
S_ISGID
Set-group-ID on execution
sticky_bit
01000
S_ISVTX
Operating system dependent.
mask
07777
all | set_uid | set_gid | sticky_bit
unknown
0xFFFF
The permissions are not known, such as when a file_status object is created without specifying the permissions
Table 137: Enum class perm_options[tab:fs.enum.perm.opts]
Name
Meaning
replace
permissions shall replace the file's permission bits with perm
add
permissions shall replace the file's permission bits with the bitwise or of perm and the file's current permission bits.
remove
permissions shall replace the file's permission bits with the bitwise and of the complement of perm and the file's current permission bits.
nofollow
permissions shall change the permissions of a symbolic link itself rather than the permissions of the file the link resolves to.
Table 138: Enum class directory_options[tab:fs.enum.dir.opts]
Name
Meaning
none
(Default) Skip directory symlinks, permission denied is an error.
follow_directory_symlink
Follow rather than skip directory symlinks.
skip_permission_denied
Skip directories that would otherwise result in permission denied.
Table 139: Regular expressions library summary [tab:re.summary]
Subclause
Header
Requirements
Constants
<regex>
Exception type
Traits
Regular expression template
Submatches
Match results
Algorithms
Iterators
Grammar
Table 140: syntax_option_type effects [tab:re.synopt]
Element
Effect(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 no sub-expressions shall be considered to be marked, so that when a regular expression is matched against a character container sequence, no sub-expression matches shall be stored in the supplied match_results object.
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].

See also: ECMA-262 15.10
basic
Specifies that the grammar recognized by the regular expression engine shall be that used by basic regular expressions in POSIX.
See also: POSIX, Base Definitions and Headers, Section 9.3
extended
Specifies that the grammar recognized by the regular expression engine shall be that used by extended regular expressions in POSIX.
See also: POSIX, Base Definitions and Headers, Section 9.4
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.
multiline
Specifies that ^ shall match the beginning of a line and $ shall match the end of a line, if the ECMAScript engine is selected.
Table 141: regex_constants​::​match_flag_type effects when obtaining a match against a character container sequence [first, last). [tab:re.matchflag]
Element
Effect(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 and iterators.
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.
Table 142: error_type values in the C locale [tab:re.err]
Value
Error condition
error_collate
The expression contains an invalid collating element name.
error_ctype
The expression contains an invalid character class name.
error_escape
The expression contains an invalid escaped character, or a trailing escape.
error_backref
The expression contains an invalid back reference.
error_brack
The expression contains mismatched [ and ].
error_paren
The expression contains mismatched ( and ).
error_brace
The expression contains mismatched { and }
error_badbrace
The expression contains an invalid range in a {} expression.
error_range
The expression contains an invalid character range, such as [b-a] in most encodings.
error_space
There is insufficient memory to convert the expression into a finite state machine.
error_badrepeat
One of *?+{ is not preceded by a valid regular expression.
error_complexity
The complexity of an attempted match against a regular expression exceeds a pre-set level.
error_stack
There is insufficient memory to determine whether the regular expression matches the specified character sequence.
Table 143: Character class names and corresponding ctype masks [tab:re.traits.classnames]
Narrow character name
Wide character name
Corresponding ctype_base​::​mask value
"alnum"
L"alnum"
ctype_base​::​alnum
"alpha"
L"alpha"
ctype_base​::​alpha
"blank"
L"blank"
ctype_base​::​blank
"cntrl"
L"cntrl"
ctype_base​::​cntrl
"digit"
L"digit"
ctype_base​::​digit
"d"
L"d"
ctype_base​::​digit
"graph"
L"graph"
ctype_base​::​graph
"lower"
L"lower"
ctype_base​::​lower
"print"
L"print"
ctype_base​::​print
"punct"
L"punct"
ctype_base​::​punct
"space"
L"space"
ctype_base​::​space
"s"
L"s"
ctype_base​::​space
"upper"
L"upper"
ctype_base​::​upper
"w"
L"w"
ctype_base​::​alnum
"xdigit"
L"xdigit"
ctype_base​::​xdigit
Table 144: match_results copy/move operation postconditions [tab:re.results.const]
Element
Value
ready()
m.ready()
size()
m.size()
str(n)
m.str(n) for all non-negative integers n < m.size()
prefix()
m.prefix()
suffix()
m.suffix()
(*this)[n]
m[n] for all non-negative integers n < m.size()
length(n)
m.length(n) for all non-negative integers n < m.size()
position(n)
m.position(n) for all non-negative integers n < m.size()
Table 145: Effects of regex_match algorithm [tab:re.alg.match]
Element
Value
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
m[n].first
For all integers 0 < 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 0 < 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 0 < n < m.size(), true if sub-expression n participated in the match, false otherwise.
Table 146: Effects of regex_search algorithm [tab:re.alg.search]
Element
Value
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
m[n].first
For all integers 0 < 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 0 < 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 0 < n < m.size(), true if sub-expression n participated in the match, false otherwise.
Table 147: Concurrency support library summary [tab:thread.summary]
Subclause
Header
Requirements
Stop tokens
<stop_token>
Threads
<thread>
Atomic operations
<atomic>, <stdatomic.h>
Mutual exclusion
<mutex>, <shared_mutex>
Condition variables
<condition_variable>
Semaphores
<semaphore>
Coordination types
<latch>, <barrier>
Futures
<future>
Safe reclamation
<rcu>, <hazard_pointer>
Table 148: Atomic arithmetic computations [tab:atomic.types.int.comp]
key
Op
Computation
key
Op
Computation
add
+
addition
and
&
bitwise and
sub
-
subtraction
or
|
bitwise inclusive or
max
maximum
xor
^
bitwise exclusive or
min
minimum
Table 149: Atomic pointer computations [tab:atomic.types.pointer.comp]
key
Op
Computation
key
Op
Computation
add
+
addition
sub
-
subtraction
max
maximum
min
minimum