Alternative  Primary  Alternative  Primary  Alternative  Primary 
<%  {  and  &&  and_eq  &= 
%>  }  bitor    or_eq  = 
<:  [  or    xor_eq  ^= 
:>  ]  xor  ^  not  ! 
%:  #  compl  ~  not_eq  != 
%:%:  ##  bitand  & 
00A8  00AA  00AD  00AF  00B200B5 
00B700BA  00BC00BE  00C000D6  00D800F6  00F800FF 
0100167F  1681180D  180F1FFF  
200B200D  202A202E  203F2040  2054  2060206F 
2070218F  246024FF  27762793  2C002DFF  2E802FFF 
30043007  3021302F  3031D7FF  
F900FD3D  FD40FDCF  FDF0FE44  FE47FFFD  
100001FFFD  200002FFFD  300003FFFD  400004FFFD  500005FFFD 
600006FFFD  700007FFFD  800008FFFD  900009FFFD  A0000AFFFD 
B0000BFFFD  C0000CFFFD  D0000DFFFD  E0000EFFFD 
0300036F  1DC01DFF  20D020FF  FE20FE2F 
Suffix  Decimal literal  Binary, octal, or hexadecimal literal 
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 
newline  NL(LF)  \n 
horizontal tab  HT  \t 
vertical tab  VT  \v 
backspace  BS  \b 
carriage return  CR  \r 
form feed  FF  \f 
alert  BEL  \a 
backslash  \  \\ 
question mark  ?  \? 
single quote  '  \' 
double quote  "  \" 
octal number  ooo  \ooo 
hex number  hhh  \xhhh 
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" 
no cvqualifier  <  const 
no cvqualifier  <  volatile 
no cvqualifier  <  const volatile 
const  <  const volatile 
volatile  <  const volatile 
Specifier(s)  Type 
typename  the type named 
simpletemplateid  the type as defined in [temp.names] 
decltypespecifier  the type as defined in [dcl.type.decltype] 
placeholdertypespecifier  the type as defined in [dcl.spec.auto] 
templatename  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” 
Subclause  Expression  As member function  As nonmember 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) 
Conversion  Category  Rank  Subclause 
No conversions required  Identity  
Lvaluetorvalue conversion  
Arraytopointer conversion  Lvalue Transformation  
Functiontopointer conversion  Exact Match  
Qualification conversions  
Function pointer conversion  Qualification Adjustment  
Integral promotions  
Floatingpoint promotion  Promotion  Promotion  
Integral conversions  
Floatingpoint conversions  
Floatingintegral conversions  
Pointer conversions  Conversion  Conversion  
Pointertomember conversions  
Boolean conversions 
Attribute  Value 
assert  201806L 
carries_dependency  200809L 
deprecated  201309L 
ensures  201806L 
expects  201806L 
fallthrough  201603L 
likely  201803L 
maybe_unused  201603L 
no_unique_address  201803L 
nodiscard  201603L 
noreturn  200809L 
unlikely  201803L 
Macro name  Value 
201603L  
201304L  
201902L  
200704L  
201606L  
200809L  
201304L  
201603L  
201811L  
201806L  
201603L  
201902L  
200707L  
201304L  
201703L  
200604L  
201411L  
201603L  
201304L  
201606L  
201603L  
201606L  
201806L  
201711L  
201511L  
201304L  
200806L  
201606L  
200907L  
201411L  
201510L  
201411L  
201606L  
201806L  
200809L  
201603L  
200710L  
200710L  
201304L  
200610L  
201309L  
201411L  
201606L  
201611L  
200806L  
200704L  
200710L  
200809L  
201304L  
200704L  
201611L 
Clause  Category  
Language support library  
Concepts library  
Diagnostics 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  
Atomic operations library  
Thread support library 
<algorithm>  <forward_list>  <new>  <string_view> 
<any>  <fstream>  <numeric>  <strstream> 
<array>  <functional>  <optional>  <syncstream> 
<atomic>  <future>  <ostream>  <system_error> 
<bit>  <initializer_list>  <queue>  <thread> 
<bitset>  <iomanip>  <random>  <tuple> 
<charconv>  <ios>  <ranges>  <typeindex> 
<chrono>  <iosfwd>  <ratio>  <typeinfo> 
<codecvt>  <iostream>  <regex>  <type_traits> 
<compare>  <istream>  <scoped_allocator>  <unordered_map> 
<complex>  <iterator>  <set>  <unordered_set> 
<concepts>  <limits>  <shared_mutex>  <utility> 
<condition_variable>  <list>  <span>  <valarray> 
<contract>  <locale>  <sstream>  <variant> 
<deque>  <map>  <stack>  <vector> 
<exception>  <memory>  <stdexcept>  <version> 
<execution>  <memory_resource>  <streambuf>  
<filesystem>  <mutex>  <string> 
<cassert>  <cfenv>  <climits>  <csetjmp>  <cstddef>  <cstdlib>  <cuchar> 
<cctype>  <cfloat>  <clocale>  <csignal>  <cstdint>  <cstring>  <cwchar> 
<cerrno>  <cinttypes>  <cmath>  <cstdarg>  <cstdio>  <ctime>  <cwctype> 
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 
Subclause  Header(s)  
Types  <cstddef>  
Implementation properties  <cfloat> <limits> <climits> <version>  
Integer types  <cstdint>  
Start and termination  <cstdlib>  
Dynamic memory management  <new>  
Type identification  <typeinfo>  
Exception handling  <exception>  
Initializer lists  <initializer_list>  
Coroutines support  <coroutine>  
Other runtime support  <cstdarg>  
Concepts library  <concepts>  
Type traits  <type_traits>  
Bit manipulation  <bit>  
Atomics  <atomic> 
Expression  Return type  Requirement 
a == b  convertible to bool 
Expression  Return type  Requirement 
a < b  convertible to bool 
Expression  Postcondition 
T t;  object t is defaultinitialized 
T u{};  object u is valueinitialized or aggregateinitialized 
T() T{}  an object of type T is valueinitialized
or aggregateinitialized 
Expression  Postcondition 
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 
Expression  Postcondition 
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) 
Expression  Return type  Return value  Postcondition 
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. 
Expression  Return type  Return value  Postcondition 
t = v  T&  t  t is equivalent to v, the value of v is unchanged 
Expression  Postcondition 
u.~T()  All resources owned by u are reclaimed, no exception is propagated. 
Expression  Return type  Operational semantics 
P u(np);  Ensures: u == nullptr  
P u = np;  
P(np)  Ensures: P(np) == nullptr  
t = np  P&  Ensures: t == nullptr 
a != b  contextually convertible to bool  !(a == b) 
a == np  contextually convertible to bool  a == P() 
np == a  
a != np  contextually convertible to bool  !(a == np) 
np != a 
Expression  Return type  Requirement 
h(k)  size_t  The value returned shall depend only on the argument k for the duration of
the program. 
h(u)  size_t  Shall not modify u. 
Variable  Definition 
T, U, C  any cvunqualified object type ([basic.types]) 
X  an allocator class for type T 
Y  the corresponding allocator class for type U 
XX  the type allocator_traits<X> 
YY  the type allocator_traits<Y> 
a, a1, a2  lvalues of type X 
u  the name of a variable being declared 
b  a value of type Y 
c  a pointer of type C* through which indirection is valid 
p  a value of type XX::pointer, obtained
by calling a1.allocate, where a1 == a 
q  
r  
w  a value of type XX::void_pointer obtained by
conversion from a value p 
x  a value of type XX::const_void_pointer obtained by
conversion from a value q or a value w 
y  a value of type XX::const_void_pointer obtained by
conversion from a result value of YY::allocate, or else a value of
type (possibly const) std::nullptr_t. 
n  a value of type XX::size_type. 
Args  a template parameter pack 
args  a function parameter pack with the pattern Args&& 
Expression  Return type  Assertion/note  Default 
pre/postcondition  
X::pointer  T*  
X::const_pointer  X::pointer is convertible to X::const_pointer  pointer_traits<X::pointer>::rebind<const T>  
X::void_pointer Y::void_pointer  pointer_traits<X::pointer>::rebind<void>  
X::const_void_pointer Y::const_void_pointer  pointer_traits<X::pointer>::rebind<const void>  
X::value_type  Identical to T  
X::size_type  unsigned integer type  a type that can represent the size of the largest object in the allocation model.  make_unsigned_t<X::difference_type> 
X::difference_type  signed integer type  a type that can represent the difference between any two pointers
in the allocation model.  pointer_traits<X::pointer>::difference_type 
typename X::template rebind<U>::other  Y  See Note A, below.  
*p  T&  
*q  const T&  *q refers to the same object as *p  
p>m  type of T::m  equivalent to (*p).m  
q>m  type of T::m  equivalent to (*q).m  
static_cast<X::pointer>(w)  X::pointer  static_cast<X::pointer>(w) == p  
static_cast<X::const_pointer>(x)  X::const_pointer  static_cast< X::const_pointer>(x) == q  
pointer_traits<X::pointer>::pointer_to(r)  X::pointer  same as p  
a.allocate(n)  X::pointer  
a.allocate(n, y)  X::pointer  Same as a.allocate(n). The use of y is unspecified, but
it is intended as an aid to locality.  a.allocate(n) 
a.deallocate(p,n)  (not used)  Requires: p shall be a value returned by an earlier call
to allocate that has not been invalidated by
an intervening call to deallocate.  
a.max_size()  X::size_type  the largest value that can meaningfully be passed to X::allocate()  numeric_limits<size_type>::max() / sizeof(value_type) 
a1 == a2  bool  returns true only if storage allocated from each can
be deallocated via the other. operator== shall be reflexive, symmetric,
and transitive, and shall not exit via an exception.  
a1 != a2  bool  same as !(a1 == a2)  
a == b  bool  same as a == Y::rebind<T>::other(b)  
a != b  bool  same as !(a == b)  
X u(a); X u = a;  Shall not exit via an exception. Ensures: u == a  
X u(b);  Shall not exit via an exception. Ensures: Y(u) == b, u == X(b)  
X u(std::move(a)); X u = std::move(a);  Shall not exit via an exception.  
X u(std::move(b));  Shall not exit via an exception.  
a.construct(c, args)  (not used)  Effects: Constructs an object of type C at
c  ::new ((void*)c) C(forward<Args>(args)...) 
a.destroy(c)  (not used)  Effects: Destroys the object at c  c>~C() 
a.select_on_container_copy_construction()  X  Typically returns either a or X()  return a; 
X::propagate_on_container_copy_assignment  Identical to or derived from true_type or false_type  true_type only if an allocator of type X should be copied
when the client container is copyassigned. See Note B, below.  false_type 
X::propagate_on_container_move_assignment  Identical to or derived from true_type or false_type  true_type only if an allocator of type X should be moved
when the client container is moveassigned. See Note B, below.  false_type 
X::propagate_on_ container_swap  Identical to or derived from true_type or false_type  See Note B, below.  false_type 
X::is_always_equal  Identical to or derived from true_type or false_type  true_type only if the expression a1 == a2 is guaranteed
to be true for any two (possibly const) values
a1, a2 of type X.  is_empty<X>::type 
Subclause  Header(s)  
Common definitions  <cstddef>  
<cstdlib>  
Implementation properties  <limits>  
<climits>  
<cfloat>  
<version>  
Integer types  <cstdint>  
Start and termination  <cstdlib>  
Dynamic memory management  <new>  
Type identification  <typeinfo>  
Contract violation handling  <contract>  
Exception handling  <exception>  
Initializer lists  <initializer_list>  
Comparisons  <compare>  
Coroutines  <coroutine>  
Other runtime support  <csignal>  
<csetjmp>  
<cstdarg>  
<cstdlib> 
Macro name  Value  Header(s) 
201603L  <memory>  
201411L  <memory> <scoped_allocator> <string>
<deque> <forward_list> <list> <vector>
<map> <set> <unordered_map>
<unordered_set>  
201606L  <any>  
201603L  <tuple>  
201603L  <iterator> <array>  
201510L  <utility>  
201603L  <atomic>  
201806L  <atomic>  
201806L  <bit>  
201811L  <functional>  
201505L  <type_traits>  
201902L  <type_traits>  
201603L  <functional>  
201603L  <cstddef>  
201811L  <atomic> <filesystem> <istream> <limits>
<locale> <ostream> <string> <string_view>  
201611L  <chrono>  
201304L  <chrono>  
201603L  <algorithm>  
201309L  <complex>  
201806L  <concepts>  
201811L  <array> <functional> <iterator>
<string_view> <tuple> <utility>  
201806L  <algorithm>  
201806L  <new>  
201603L  <memory>  
201811L  <string> <deque> <forward_list> <list>
<vector> <map> <set> <unordered_map>
<unordered_set>  
201304L  <utility>  
201902L  <execution>  
201703L  <filesystem>  
201606L  <numeric>  
201304L  <map> <set>  
201811L  <unordered_map> <unordered_set>  
201902L  <unordered_map> <unordered_set>  
201703L  <new>  
201606L  <type_traits>  
201603L  <cmath>  
201505L  <forward_list> <list> <vector>  
201304L  <utility>  
201304L  <type_traits>  
201902L  <cmath> <numeric>  
201411L  <functional>  
201703L  <type_traits>  
201811L  <type_traits>  
201402L  <type_traits>  
201703L  <type_traits>  
201309L  <type_traits>  
201603L  <type_traits>  
201606L  <new>  
201806L  <forward_list> <list>  
201510L  <type_traits>  
201606L  <tuple>  
201402L  <iterator>  
201304L  <memory>  
201411L  <map>  
201603L  <cmath>  
201603L  <memory_resource>  
201606L  <map> <set> <unordered_map>
<unordered_set>  
201411L  <iterator> <array> <deque> <forward_list>
<list> <map> <regex> <set> <string>
<unordered_map> <unordered_set> <vector>  
201603L  <functional>  
201304L  <iterator>  
201606L  <optional>  
201603L  <algorithm> <numeric>  
201304L  <iomanip>  
201811L  <algorithm> <functional> <iterator>
<memory> <ranges>  
201606L  <memory>  
201210L  <functional> <type_traits>  
201304L  <algorithm>  
201603L  <algorithm>  
201703L  <mutex>  
201505L  <shared_mutex>  
201611L  <memory>  
201606L  <memory>  
201402L  <shared_mutex>  
201304L  <string>  
201606L  <string> <string_view>  
201711L  <compare>  
201611L  <charconv>  
201304L  <type_traits>  
201510L  <memory> <functional>  
201402L  <tuple>  
201304L  <utility> <tuple>  
201510L  <type_traits>  
201411L  <exception>  
201411L  <unordered_map>  
201606L  <variant>  
201411L  <type_traits> 
Subclause  Header(s)  
Equality preservation  
Languagerelated concepts  <concepts>  
Comparison concepts  
Object concepts  
Callable concepts 
Subclause  Header(s)  
Exception classes  <stdexcept>  
Assertions  <cassert>  
Error numbers  <cerrno>  
System error support  <system_error> 
Subclause  Header(s)  
Utility components  <utility>  
Compiletime integer sequences  <utility>  
Pairs  <utility>  
Tuples  <tuple>  
Optional objects  <optional>  
Variants  <variant>  
Storage for any type  <any>  
Fixedsize sequences of bits  <bitset>  
Memory  <memory>  
<cstdlib>  
Smart pointers  <memory>  
Memory resources  <memory_resource>  
Scoped allocators  <scoped_allocator>  
Function objects  <functional>  
Type traits  <type_traits>  
Compiletime rational arithmetic  <ratio>  
Type indexes  <typeindex>  
Execution policies  <execution>  
Primitive numeric conversions  <charconv> 
*this contains a value  *this does not contain a value  
rhs contains a value  assigns *rhs to the contained value  initializes the contained value as if directnonlistinitializing an object of type T with *rhs 
rhs does not contain a value  destroys the contained value by calling val>T::~T()  no effect 
*this contains a value  *this does not contain a value  
rhs contains a value  assigns std::move(*rhs) to the contained value  initializes the contained value as if directnonlistinitializing an object of type T with std::move(*rhs) 
rhs does not contain a value  destroys the contained value by calling val>T::~T()  no effect 
*this contains a value  *this does not contain a value  
rhs contains a value  assigns *rhs to the contained value  initializes the contained value as if directnonlistinitializing
an object of type T with *rhs 
rhs does not contain a value  destroys the contained value by calling val>T::~T()  no effect 
*this contains a value  *this does not contain a value  
rhs contains a value  assigns std::move(*rhs) to the contained value  initializes the contained value as if directnonlistinitializing
an object of type T with std::move(*rhs) 
rhs does not contain a value  destroys the contained value by calling val>T::~T()  no effect 
*this contains a value  *this does not contain a value  
rhs contains a value  calls swap(*(*this), *rhs)  initializes the contained value of *this as if
directnonlistinitializing an object of type T with the expression std::move(*rhs),
followed by rhs.val>T::~T();
postcondition is that *this contains a value and rhs does not contain a value 
rhs does not contain a value  initializes the contained value of rhs as if
directnonlistinitializing an object of type T with the expression std::move(*(*this)),
followed by val>T::~T();
postcondition is that *this does not contain a value and rhs contains a value  no effect 
Template  Condition  Comments 
T is void  
T is an integral type ([basic.fundamental])  
T is a floatingpoint type ([basic.fundamental])  
T is an array type ([basic.compound]) of known or unknown extent  
T is a pointer type ([basic.compound])  Includes pointers to functions
but not pointers to nonstatic members.  
T is an lvalue reference type ([dcl.ref])  
T is an rvalue reference type ([dcl.ref])  
T is a pointer to data member  
T is a pointer to member function  
T is an enumeration type ([basic.compound])  
T is a union type ([basic.compound])  
T is a nonunion class type ([basic.compound])  
T is a function type ([basic.compound]) 
Template  Condition  Comments 
T is an lvalue reference or an rvalue reference  
T is an arithmetic type  
T is a fundamental type  
T is an object type  
T is a scalar type  
T is a compound type  
T is a pointertomember type 
Template  Condition  Preconditions 
T is constqualified ([basic.type.qualifier])  
T is volatilequalified ([basic.type.qualifier])  
T is a trivial type ([basic.types])  
T is a trivially copyable type ([basic.types])  
T is a standardlayout type ([basic.types])  
T is a class type, but not a union type, with no nonstatic data
members other than subobjects of zero size, no virtual member functions,
no virtual base classes, and no base class B for
which is_empty_v<B> is false.  
T is a polymorphic class ([class.virtual])  
T is an abstract class ([class.abstract])  
T is an aggregate type ([dcl.init.aggr])  
If is_arithmetic_v<T> is true, the same result as
T(1) < T(0);
otherwise, false  
If is_arithmetic_v<T> is true, the same result as
T(0) < T(1);
otherwise, false  
T is an array type of known bound ([dcl.array])  
T is an array type of unknown bound ([dcl.array])  
For a function type T or
for a cv void type T,
is_constructible_v<T, Args...> is false,
otherwise see below  T and all types in the template parameter pack Args
shall be complete types, cv void,
or arrays of unknown bound.  
For a referenceable type T ([defns.referenceable]), the same result as
is_constructible_v<T, const T&>, otherwise false.  
Only the validity of the immediate context
of the assignment expression is considered. [ Note : ]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
implicitlydefined functions, and so on. Such side effects are not in the “immediate
context” and can result in the program being illformed. — end note  
The expressions swap(declval<T>(), declval<U>()) and
swap(declval<U>(), declval<T>()) are each wellformed
when treated as an unevaluated operand
in an overloadresolution context
for swappable values ([swappable.requirements]). Only the validity of the immediate context
of the swap expressions is considered. [ Note : ]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 implicitlydefined functions, and so on. Such side effects are not in the “immediate context” and
can result in the program being illformed. — end note  
Either T is a reference type,
or T is a complete object type
for which the expression
declval<U&>().~U()
is wellformed
when treated as an unevaluated operand,
where U is
remove_all_extents_t<T>.  
is_constructible_v<T, Args...> is true and the variable definition for is_constructible, as defined below, is known to call no operation that is not trivial ([basic.types], [special]).  T and all types in the template parameter pack Args shall be complete types,
cv void, or arrays of unknown bound.  
For a referenceable type T, the same result as
is_trivially_constructible_v<T, const T&>, otherwise false.  
For a referenceable type T, the same result as
is_trivially_constructible_v<T, T&&>, otherwise false.  
is_assignable_v<T, U> is true and the assignment, as defined by
is_assignable, is known to call no operation that is not trivial
([basic.types], [special]).  
For a referenceable type T, the same result as
is_trivially_assignable_v<T&, const T&>, otherwise false.  
For a referenceable type T, the same result as
is_trivially_assignable_v<T&, T&&>, otherwise false.  
is_destructible_v<T> is true and
remove_all_extents_t<T> is either a nonclass type or
a class type with a trivial destructor.  
is_constructible_v<T, Args...> is true
and the
variable definition for is_constructible, as defined below, is known not to
throw any exceptions ([expr.unary.noexcept]).  T and all types in the template parameter pack Args
shall be complete types, cv void,
or arrays of unknown bound.  
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.  
For a referenceable type T, the same result as
is_nothrow_constructible_v<T, T&&>, otherwise false.  
is_assignable_v<T, U> is true and the assignment is known not to
throw any exceptions ([expr.unary.noexcept]).  
For a referenceable type T, the same result as
is_nothrow_assignable_v<T&, const T&>, otherwise false.  
For a referenceable type T, the same result as
is_nothrow_assignable_v<T&, T&&>, otherwise false.  
is_swappable_with_v<T, U> is true and
each swap expression of the definition of
is_swappable_with<T, U> is known not to throw
any exceptions ([expr.unary.noexcept]).  
For a referenceable type T,
the same result as is_nothrow_swappable_with_v<T&, T&>,
otherwise false.  
is_destructible_v<T> is true and the indicated destructor is known
not to throw any exceptions ([expr.unary.noexcept]).  
T has a virtual destructor ([class.dtor])  
For an array type T, the same result as
has_unique_object_representations_v<remove_all_extents_t<T>>,
otherwise see below. 
Template  Value 
alignof(T).  
If T names an array type, an integer value representing
the number of dimensions of T; otherwise, 0.  
If T is not an array type, or if it has rank less
than or equal to I, or if I is 0 and T
has type “array of unknown bound of U”, then
0; otherwise, the bound ([dcl.array]) of the dimension of
T, where indexing of I is zerobased 
Template  Condition  Comments 
template<class T, class U> struct is_same;  T and U name the same type with the same cvqualifications  
Base is a base class of Derived ([class.derived])
without regard to cvqualifiers
or Base and Derived are not unions and
name the same class type
without regard to cvqualifiers  If Base and
Derived are nonunion class types and are
not possibly cvqualified versions of the same type,
Derived shall be a complete
type.  
see below  
is_convertible_v<From, To> is true and
the conversion, as defined by is_convertible,
is known not to throw any exceptions ([expr.unary.noexcept])  
The expression INVOKE(declval<Fn>(), declval<ArgTypes>()...)
is wellformed when treated as an unevaluated operand  Fn and all types in the template parameter pack ArgTypes
shall be complete types, cv void, or
arrays of unknown bound.  
The expression INVOKE<R>(declval<Fn>(), declval<ArgTypes>()...)
is wellformed when treated as an unevaluated operand  Fn, R, and all types in the template parameter pack ArgTypes
shall be complete types, cv void, or
arrays of unknown bound.  
is_invocable_v< Fn, ArgTypes...> is true and the expression INVOKE(declval<Fn>(), declval<ArgTypes>()...) is known not to throw any exceptions ([expr.unary.noexcept])  Fn and all types in the template parameter pack ArgTypes
shall be complete types, cv void, or
arrays of unknown bound.  
is_invocable_r_v< R, Fn, ArgTypes...> is true and the expression INVOKE<R>(declval<Fn>(), declval<ArgTypes>()...) is known not to throw any exceptions ([expr.unary.noexcept])  Fn, R, and all types in the template parameter pack ArgTypes
shall be complete types, cv void, or
arrays of unknown bound. 
Template  Comments 
The member typedef type names
the same type as T
except that any toplevel constqualifier has been removed.  
The member typedef type names
the same type as T
except that any toplevel volatilequalifier has been removed.  
The member typedef type shall be the same as T
except that any toplevel cvqualifier has been removed.  
If T is a reference, function, or toplevel constqualified
type, then type names
the same type as T, otherwise
T const.  
If T is a reference, function, or toplevel volatilequalified
type, then type names
the same type as T, otherwise
T volatile.  
Template  Comments 
If T names a (possibly cvqualified)
signed integer type then the member typedef
type names the type T; otherwise,
if T names a (possibly cvqualified) unsigned integer
type then type names the corresponding
signed integer type, with the same cvqualifiers as T;
otherwise, type names the signed integer type with smallest
rank for which
sizeof(T) == sizeof(type), with the same
cvqualifiers as T.  
If T names a (possibly cvqualified)
unsigned integer type then the member typedef
type names the type T; otherwise,
if T names a (possibly cvqualified) signed integer
type then type names the corresponding
unsigned integer type, with the same cvqualifiers as T;
otherwise, type names the unsigned integer type with smallest
rank for which
sizeof(T) == sizeof(type), with the same
cvqualifiers as T. 
Template  Comments 
If T has type “(possibly cvqualified) pointer
to T1” then the member typedef type
names T1; otherwise, it names T.  
If T names a referenceable type or a
cv void type then
the member typedef type names the same type as
remove_reference_t<T>*;
otherwise, type names T. 
Template  Comments 
The value of defaultalignment shall be the most
stringent alignment requirement for any C++ object type whose size
is no greater than Len ([basic.types]). The member typedef type shall be a trivial standardlayout type
suitable for use as uninitialized storage for any object whose size
is at most Len and whose alignment is a divisor of Align.  
The member typedef type shall be a trivial standardlayout type suitable for use as
uninitialized storage for any object whose type is listed in Types;
its size shall be at least Len. The static member alignment_value
shall be an integral constant of type size_t whose value is the
strictest alignment of all types listed in Types. Each type in the template parameter pack Types shall be a complete object type.  
[ Note : ]This behavior is similar to the lvaluetorvalue ([conv.lval]),
arraytopointer ([conv.array]), and functiontopointer ([conv.func])
conversions applied when an lvalue is used as an rvalue, but also
strips cvqualifiers from class types in order to more closely model byvalue
argument passing. — end note  
template<bool B, class T,
class F> struct conditional;  
template<class... T> struct common_type;  Unless this trait is specialized (as specified in Note B, below),
the member type shall be 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. 
Unless this trait is specialized (as specified in Note D, below),
there shall be no member type.  
If T is an enumeration type, the member typedef type names
the underlying type of T ([dcl.enum]);
otherwise, there is no member type.  
template<class Fn, class... ArgTypes> struct invoke_result;  If the expression INVOKE(declval<Fn>(), declval<ArgTypes>()...)
is wellformed when treated as an unevaluated operand,
the member typedef type names the type
decltype(INVOKE(declval<Fn>(), declval<ArgTypes>()...));
otherwise, there shall be no member type. Only the validity of the immediate context of the
expression is considered. [ Note : ]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 implicitlydefined
functions, and so on. Such side effects are not in the “immediate
context” and can result in the program being illformed. — end noteRequires: Fn and all types in the template parameter pack ArgTypes shall be complete types, cv void, or arrays of unknown bound. 
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 
Subclause  Header(s)  
Character traits  <string>  
String classes  <string>  
String view classes  <string_view>  
<cctype>  
<cwctype>  
Nullterminated sequence utilities  <cstring>  
<cwchar>  
<cstdlib>  
<cuchar> 
Expression  Return type  Assertion/note  Complexity 
pre/postcondition  
X::char_type  C  compiletime  
X::int_type  (described in [char.traits.typedefs])  compiletime  
X::off_type  (described in [iostreams.limits.pos] and [iostream.forward])  compiletime  
X::pos_type  (described in [iostreams.limits.pos] and [iostream.forward])  compiletime  
X::state_type  (described in [char.traits.typedefs])  compiletime  
X::eq(c,d)  bool  constant  
X::lt(c,d)  bool  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  linear  
X::find(p,n,c)  const X::char_type*  linear  
X::move(s,p,n)  X::char_type*  linear  
X::copy(s,p,n)  X::char_type*  linear  
X::assign(r,d)  (not used)  assigns r=d.  constant 
X::assign(s,n,c)  X::char_type*  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  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  constant 
Condition  Return Value 
size() < str.size()  < 0 
size() == str.size()  0 
size() > str.size()  > 0 
Expression  Equivalent to 
t == sv  S(t) == sv 
sv == t  sv == S(t) 
t != sv  S(t) != sv 
sv != t  sv != S(t) 
t < sv  S(t) < sv 
sv < t  sv < S(t) 
t > sv  S(t) > sv 
sv > t  sv > S(t) 
t <= sv  S(t) <= sv 
sv <= t  sv <= S(t) 
t >= sv  S(t) >= sv 
sv >= t  sv >= S(t) 
Subclause  Header(s)  
Requirements  
Sequence containers  <array>  
<deque>  
<forward_list>  
<list>  
<vector>  
Associative containers  <map>  
<set>  
Unordered associative containers  <unordered_map>  
<unordered_set>  
Container adaptors  <queue>  
<stack>  
Views  <span> 
Expression  Return type  Operational  Assertion/note  Complexity 
semantics  pre/postcondition  
X::value_type  T  compile time  
X::reference  T&  compile time  
X::const_reference  const T&  compile time  
X::iterator  iterator type whose value type is T  any iterator category
that meets the forward iterator requirements. convertible to X::const_iterator.  compile time  
X::const_iterator  constant iterator type whose value type is T  any iterator category
that meets the forward iterator requirements.  compile time  
X::difference_type  signed integer type  is identical to the difference type of X::iterator and X::const_iterator  compile time  
X::size_type  unsigned integer type  size_type can represent any nonnegative value of difference_type  compile time  
X u;  Ensures: u.empty()  constant  
X()  Ensures: X().empty()  constant  
X(a)  linear  
X u(a); X u = a;  Ensures: u == a  linear  
X u(rv); X u = rv;  Ensures: u is equal to the value that rv had before this construction  (Note B)  
a = rv  X&  All existing elements of a are either move assigned to or destroyed  Ensures: a is equal to the value that rv
had before this assignment  linear 
a.~X()  void  linear  
a.begin()  iterator; const_iterator for constant a  constant  
a.end()  iterator; const_iterator for constant a  constant  
a.cbegin()  const_iterator  const_cast<X const&>(a).begin();  constant  
a.cend()  const_iterator  const_cast<X const&>(a).end();  constant  
a == b  convertible to bool  == is an equivalence relation. equal(a.begin(), a.end(), b.begin(), b.end())  Expects: T meets the Cpp17EqualityComparable requirements  Constant if a.size() != b.size(),
linear otherwise 
a != b  convertible to bool  Equivalent to !(a == b)  linear  
a.swap(b)  void  Effects: exchanges the contents of a and b  (Note A)  
swap(a, b)  void  Equivalent to a.swap(b)  (Note A)  
r = a  X&  linear  
a.size()  size_type  distance(a.begin(), a.end())  constant  
a.max_size()  size_type  distance(begin(), end())
for the largest possible container  constant  
a.empty()  convertible to bool  a.begin() == a.end()  constant 
Expression  Return type  Assertion/note  Complexity 
pre/postcondition  
X::reverse_iterator  iterator type whose value type is T  reverse_iterator<iterator>  compile time 
X::const_reverse_iterator  constant iterator type whose value type is T  reverse_iterator<const_iterator>  compile time 
a.rbegin()  reverse_iterator; const_reverse_iterator for constant a  reverse_iterator(end())  constant 
a.rend()  reverse_iterator; const_reverse_iterator for constant a  reverse_iterator(begin())  constant 
a.crbegin()  const_reverse_iterator  const_cast<X const&>(a).rbegin()  constant 
a.crend()  const_reverse_iterator  const_cast<X const&>(a).rend()  constant 
Expression  Return type  Operational  Assertion/note  Complexity 
semantics  pre/postcondition  
a < b  convertible to bool  lexicographical_compare( a.begin(), a.end(), b.begin(), b.end())  < is a total ordering relationship.  linear 
a > b  convertible to bool  b < a  linear  
a <= b  convertible to bool  !(a > b)  linear  
a >= b  convertible to bool  !(a < b)  linear 
Expression  Return type  Assertion/note  Complexity 
pre/postcondition  
allocator_type  A  compile time  
get_ allocator()  A  constant  
X() X u;  Ensures: u.empty() returns true, u.get_allocator() == A()  constant  
X(m)  Ensures: u.empty() returns true,  constant  
X u(m);  u.get_allocator() == m  
X(t, m) X u(t, m);  Ensures: u == t, u.get_allocator() == m  linear  
X(rv) X u(rv);  Ensures: u has the same elements as rv had before this
construction; the value of u.get_allocator() is the same as the
value of rv.get_allocator() before this construction.  constant  
X(rv, m) X u(rv, m);  Ensures: u has the same elements, or copies of the elements, that rv had before this construction, u.get_allocator() == m  constant if m == rv.get_allocator(), otherwise linear  
a = t  X&  Ensures: a == t  linear 
a = rv  X&  Expects: If allocator_ traits<allocator_type> ::propagate_on_container_ move_assignment::value is false, T is Cpp17MoveInsertable into X and Cpp17MoveAssignable.  linear 
a.swap(b)  void  Effects: exchanges the contents of a and b  constant 
Expression  Return type  Assertion/note 
pre/postcondition  
X(n, t) X u(n, t);  Ensures: distance(begin(), end()) == n Effects: Constructs a sequence container with n copies of t  
X(i, j) X u(i, j);  For vector, if the iterator does
not meet the Cpp17ForwardIterator requirements ([forward.iterators]), T
is also
Cpp17MoveInsertable into X. Ensures: distance(begin(), end()) == distance(i, j) Effects: Constructs a sequence container equal to the range [i, j).  
X(il)  Equivalent to X(il.begin(), il.end())  
a = il  X&  All existing
elements of a are either assigned to or destroyed. 
a.emplace(p, args)  iterator  
a.insert(p,t)  iterator  
a.insert(p,rv)  iterator  
a.insert(p,n,t)  iterator  
a.insert(p,i,j)  iterator  For vector and deque, T is also
Cpp17MoveInsertable into X, Cpp17MoveConstructible, Cpp17MoveAssignable,
and swappable ([swappable.requirements]). 
a.insert(p, il)  iterator  a.insert(p, il.begin(), il.end()). 
a.erase(q)  iterator  
a.erase(q1,q2)  iterator  
a.clear()  void  Invalidates all references, pointers, and
iterators referring to the elements of a and may invalidate the pasttheend iterator. 
a.assign(i,j)  void  For vector, if the iterator does not
meet the forward iterator requirements ([forward.iterators]), T
is also
Cpp17MoveInsertable into X. Invalidates all references, pointers and iterators
referring to the elements of a. 
a.assign(il)  void  a.assign(il.begin(), il.end()). 
a.assign(n,t)  void  Invalidates all references, pointers and iterators
referring to the elements of a. 
Expression  Return type  Operational semantics  Container 
a.front()  reference; const_reference for constant a  *a.begin()  basic_string,
array,
deque,
forward_list,
list,
vector 
a.back()  reference; const_reference for constant a  { auto tmp = a.end(); tmp; return *tmp; }  basic_string,
array,
deque,
list,
vector 
a.emplace_front(args)  reference  deque,
forward_list,
list  
a.emplace_back(args)  reference  deque,
list,
vector  
a.push_front(t)  void  deque,
forward_list,
list  
a.push_front(rv)  void  deque,
forward_list,
list  
a.push_back(t)  void  basic_string,
deque,
list,
vector  
a.push_back(rv)  void  basic_string,
deque,
list,
vector  
a.pop_front()  void  Effects: Destroys the first element.  deque,
forward_list,
list 
a.pop_back()  void  Effects: Destroys the last element.  basic_string,
deque,
list,
vector 
a[n]  reference; const_reference for constant a  *(a.begin() + n)  basic_string,
array,
deque,
vector 
a.at(n)  reference; const_reference for constant a  *(a.begin() + n)  basic_string,
array,
deque,
vector 
map<K, T, C1, A>  map<K, T, C2, A> 
map<K, T, C1, A>  multimap<K, T, C2, A> 
set<K, C1, A>  set<K, C2, A> 
set<K, C1, A>  multiset<K, C2, A> 
unordered_map<K, T, H1, E1, A>  unordered_map<K, T, H2, E2, A> 
unordered_map<K, T, H1, E1, A>  unordered_multimap<K, T, H2, E2, A> 
unordered_set<K, H1, E1, A>  unordered_set<K, H2, E2, A> 
unordered_set<K, H1, E1, A>  unordered_multiset<K, H2, E2, A> 
Expression  Return type  Assertion/note  Complexity 
pre/postcondition  
Key  compile time  
T  compile time  
Key  Expects: value_type is Cpp17Erasable from X  compile time  
X::value_type (map and multimap only)  pair<const Key, T>  Expects: value_type is Cpp17Erasable from X  compile time 
Compare  compile time  
a binary predicate type  is the same as key_compare for set and
multiset; is an ordering relation on pairs induced by the
first component (i.e., Key) for map and multimap.  compile time  
a specialization of a nodehandle
class template, such that the public nested types are
the same types as the corresponding types in X.  see [container.node]  compile time  
Effects: Constructs an empty container. Uses a copy of c as a comparison object.  constant  
X() X u;  Uses Compare() as a comparison object  constant  
X(i,j,c) X u(i,j,c);  Effects: Constructs an empty container and inserts elements from the range [i, j) into it; uses c as a comparison object.  in general, where N has the value distance(i, j);
linear if [i, j) is sorted with value_comp()  
X(i,j) X u(i,j);  same as above  
X(il)  same as X(il.begin(), il.end())  same as X(il.begin(), il.end())  
X(il,c)  same as X(il.begin(), il.end(), c)  same as X(il.begin(), il.end(), c)  
a = il  X&  All
existing elements of a are either assigned to or destroyed.  in general, where N has the value il.size() + a.size();
linear if [il.begin(), il.end()) is sorted with value_comp() 
X::key_compare  constant  
X::value_compare  Returns: an object of value_compare constructed out of the comparison object  constant  
pair<iterator, bool>  Effects: Inserts a value_type object t constructed with std::forward<Args>(args)... if and only if there is no element in the container with key equivalent to the key of t. The bool component of the returned
pair is true if and only if the insertion takes place, and the iterator
component of the pair points to the element with key equivalent to the
key of t.  logarithmic  
a_eq.emplace(args)  iterator  Effects: Inserts a value_type object t constructed with std::forward<Args>(args)... and returns the iterator pointing to the newly inserted element. If a range containing elements equivalent to t exists in a_eq,
t is inserted at the end of that range.  logarithmic 
iterator  Return value is an iterator pointing to the element with the key equivalent
to the newly inserted element. The element is inserted as close as possible to the position just prior
to p.  logarithmic in general, but amortized constant if the element
is inserted right before p  
pair<iterator, bool>  Expects: If t is a nonconst rvalue, value_type is
Cpp17MoveInsertable into X; otherwise, value_type is
Cpp17CopyInsertable into X. Effects: Inserts t if and only if there is no element in the container with key equivalent to the key of t. The bool component of
the returned pair is true if and only if the insertion
takes place, and the iterator
component of the pair points to the element with key
equivalent to the key of t.  logarithmic  
a_eq.insert(t)  iterator  Expects: If t is a nonconst rvalue, value_type is
Cpp17MoveInsertable into X; otherwise, value_type is
Cpp17CopyInsertable into X. If a range containing elements equivalent to
t exists in a_eq, t
is inserted at the end of that range.  logarithmic 
a.insert(p, t)  iterator  Expects: If t is a nonconst rvalue, value_type is
Cpp17MoveInsertable into X; otherwise, value_type is
Cpp17CopyInsertable into X. Effects: Inserts t if and only if there is no element with key equivalent to the key of t in containers with unique keys; always inserts t in containers with equivalent keys. Always
returns the iterator pointing to the element with key equivalent to
the key of t.  
a.insert(i, j)  void  Effects: Inserts each element from the range [i, j) if and only if there is no element with key equivalent to the key of that element in containers with unique keys; always inserts that element in containers with equivalent keys.  , where N has the value distance(i, j) 
a.insert(il)  void  equivalent to a.insert(il.begin(), il.end())  
a_uniq.insert(nh)  insert_return_type  Otherwise, inserts the
element owned by nh if and only if there is no element in the
container with a key equivalent to nh.key(). Otherwise if the insertion took place, inserted is true,
position points to the inserted element, and node is empty;
if the insertion failed, inserted is false,
node has the previous value of nh, and position
points to an element with a key equivalent to nh.key().  logarithmic 
a_eq.insert(nh)  iterator  Otherwise, inserts the element owned by nh and returns an iterator
pointing to the newly inserted element. If a range containing elements with
keys equivalent to nh.key() exists in a_eq, the element is
inserted at the end of that range.  logarithmic 
a.insert(p, nh)  iterator  Otherwise, inserts the element owned by nh if and only if there
is no element with key equivalent to nh.key() in containers with
unique keys; always inserts the element owned by nh in containers
with equivalent keys. Always returns the iterator pointing to the element
with key equivalent to nh.key(). The element is inserted as close
as possible to the position just prior to p.  logarithmic in general, but amortized constant if the element is inserted right
before p. 
node_type  log(a.size())  
a.extract(q)  node_type  amortized constant  
void  Effects: Attempts to extract each element in a2 and insert it into a using the comparison object of a. In containers with unique keys,
if there is an element in a with key equivalent to the key of an
element from a2, then that element is not extracted from a2. Ensures: Pointers and references to the transferred elements of a2 refer to those same elements but as members of a. Iterators referring
to the transferred elements will continue to refer to their elements, but
they now behave as iterators into a, not into a2.  
size_type  
a.erase(q)  iterator  Returns: An iterator pointing to the element immediately following q prior to the element being erased. If no such element exists, returns a.end().  amortized constant 
a.erase(r)  iterator  Returns: An iterator pointing to the element immediately following r prior to the element being erased. If no such element exists, returns a.end().  amortized constant 
a.erase( q1, q2)  iterator  If no such element
exists, a.end() is returned.  
void  linear in a.size().  
Returns: An iterator pointing to an element with the key equivalent
to k, or b.end() if such an element is not found.  logarithmic  
a_tran. find(ke)  Returns: An iterator pointing to an element with key r such that
!c(r, ke) && !c(ke, r), or a_tran.end() if such an element
is not found.  logarithmic  
size_type  
a_tran. count(ke)  size_type  Returns: The number of elements with key r such that
!c(r, ke) && !c(ke, r)  
bool  Effects: Equivalent to: return b.find(k) != b.end();  logarithmic  
a_tran. contains(ke)  bool  Effects: Equivalent to: return a_tran.find(ke) != a_tran.end();  logarithmic 
Returns: An iterator pointing to the first element with
key not less than k,
or b.end() if such an element is not found.  logarithmic  
a_tran. lower_bound(kl)  Returns: An iterator pointing to the first element with
key r such that !c(r, kl),
or a_tran.end() if such an element is not found.  logarithmic  
Returns: An iterator pointing to the first element with
key greater than k,
or b.end() if such an element is not found.  logarithmic  
a_tran. upper_bound(ku)  Returns: An iterator pointing to the first element with
key r such that c(ku, r),
or a_tran.end() if such an element is not found.  logarithmic  
Effects: Equivalent to: return make_pair(b.lower_bound(k), b.upper_bound(k));  logarithmic  
a_tran. equal_range(ke)  Effects: Equivalent to: return make_pair( a_tran.lower_bound(ke), a_tran.upper_bound(ke));  logarithmic 
Expression  Return type  Assertion/note  Complexity 
pre/postcondition  
Key  compile time  
T  compile time  
Key  Expects: value_type is Cpp17Erasable from X  compile time  
X::value_type (unordered_map and unordered_multimap only)  pair<const Key, T>  Expects: value_type is Cpp17Erasable from X  compile time 
Hash  compile time  
Hash::transparent_key_equal if such a qualifiedid
is valid and denotes a type ([temp.deduct]);
otherwise, Pred.  Pred is an equivalence relation.  compile time  
An iterator type whose category, value type,
difference type, and pointer and reference types are the same as
X::iterator's.  A local_iterator object may be used to iterate through a
single bucket, but may not be used to iterate across
buckets.  compile time  
An iterator type whose category, value type,
difference type, and pointer and reference types are the same as
X::const_iterator's.  A const_local_iterator object may be used to iterate through a
single bucket, but may not be used to iterate across
buckets.  compile time  
a specialization of a nodehandle
class template, such that the public nested types are
the same types as the corresponding types in X.  see [container.node]  compile time  
X  Effects: Constructs an empty container with at least n buckets,
using hf as the hash function and eq as the key
equality predicate.  
X(n, hf) X a(n, hf);  X  Effects: Constructs an empty container with at least n buckets, using hf as the hash function and key_equal() as the key equality predicate.  
X(n) X a(n);  X  Effects: Constructs an empty container with at least n buckets, using hasher() as the hash function and key_equal() as the key equality predicate.  
X() X a;  X  Effects: Constructs an empty container with an unspecified number of buckets, using hasher() as the hash function and key_equal() as the key equality predicate.  constant 
X(i, j, n, hf, eq) X a(i, j, n, hf, eq);  X  Effects: Constructs an empty container with at least n buckets, using hf as the hash function and eq as the key equality predicate, and inserts elements from [i, j) into it.  Average case (N is distance(i, j)), worst case

X(i, j, n, hf) X a(i, j, n, hf);  X  Effects: Constructs an empty container with at least n buckets, using hf as the hash function and key_equal() as the key equality predicate, and inserts elements from [i, j) into it.  Average case (N is distance(i, j)), worst case

X(i, j, n) X a(i, j, n);  X  Effects: Constructs an empty container with at least n buckets, using hasher() as the hash function and key_equal() as the key equality predicate, and inserts elements from [i, j) into it.  Average case (N is distance(i, j)), worst case

X(i, j) X a(i, j);  X  Effects: Constructs an empty container with an unspecified number of buckets, using hasher() as the hash function and key_equal() as the key equality predicate, and inserts elements from [i, j) into it.  Average case (N is distance(i, j)), worst case

X(il)  X  Same as X(il.begin(), il.end()).  
X(il, n)  X  Same as X(il.begin(), il.end(), n).  
X(il, n, hf)  X  Same as X(il.begin(), il.end(), n, hf).  
X(il, n, hf, eq)  X  Same as X(il.begin(), il.end(), n, hf, eq).  
X(b) X a(b);  X  Copy constructor.  Average case linear in b.size(), worst case quadratic. 
a = b  X&  Copy assignment operator.  Average case linear in b.size(), worst case quadratic. 
a = il  X&  All
existing elements of a are either assigned to or destroyed.  Same as a = X(il). 
hasher  constant  
key_equal  constant  
pair<iterator, bool>  Effects: Inserts a value_type object t constructed with std::forward<Args>(args)... if and only if there is no element in the container with key equivalent to the key of t. The bool component of the returned
pair is true if and only if the insertion takes place, and the iterator
component of the pair points to the element with key equivalent to the
key of t.  
a_eq.emplace(args)  iterator  Effects: Inserts a value_type object t constructed with std::forward<Args>(args)... and returns the iterator pointing to the newly inserted element.  
iterator  Return value is an iterator pointing to the element with the key equivalent
to the newly inserted element. Implementations are
permitted to ignore the hint.  
pair<iterator, bool>  Expects: If t is a nonconst rvalue, value_type is
Cpp17MoveInsertable into X; otherwise, value_type is
Cpp17CopyInsertable into X. Effects: Inserts t if and only if there is no element in the container with key equivalent to the key of t. The bool
component of the returned pair indicates whether the insertion
takes place, and the iterator component points to the element
with key equivalent to the key of t.  
a_eq.insert(t)  iterator  Expects: If t is a nonconst rvalue, value_type is
Cpp17MoveInsertable into X; otherwise, value_type is
Cpp17CopyInsertable into X.  
a.insert(p, t)  iterator  Expects: If t is a nonconst rvalue, value_type is
Cpp17MoveInsertable into X; otherwise, value_type is
Cpp17CopyInsertable into X. Return value is an iterator pointing
to the element with the key equivalent to that of t. The
iterator p is a hint pointing to where the search should
start. Implementations are permitted to ignore the hint.  
a.insert(i, j)  void  Worst case .  
a.insert(il)  void  Same as a.insert(il.begin(), il.end()).  
a_uniq. insert(nh)  insert_return_type  Otherwise, inserts the
element owned by nh if and only if there is no element in the
container with a key equivalent to nh.key(). Otherwise if the insertion took place, inserted is true,
position points to the inserted element, and node is empty;
if the insertion failed, inserted is false,
node has the previous value of nh, and position
points to an element with a key equivalent to nh.key().  
a_eq. insert(nh)  iterator  Otherwise, inserts the element owned by nh and returns an iterator
pointing to the newly inserted element.  
a.insert(q, nh)  iterator  Otherwise, inserts the element owned by nh if and only if there
is no element with key equivalent to nh.key() in containers with
unique keys; always inserts the element owned by nh in containers
with equivalent keys. Always returns the iterator pointing to the element
with key equivalent to nh.key(). The iterator q is a hint
pointing to where the search should start. Implementations are permitted
to ignore the hint.  
node_type  
a.extract(q)  node_type  
void  Attempts to extract each element in a2 and insert it into a using the hash function and key equality predicate of a. In containers with unique keys, if there is an element in a with
key equivalent to the key of an element from a2, then that
element is not extracted from a2.
Ensures: Pointers and references to the transferred elements of a2
refer to those same elements but as members of a. Iterators referring
to the transferred elements and all iterators referring to a will
be invalidated, but iterators to elements remaining in a2 will
remain valid.  Worst case .  
size_type  Average case . Worst case
.  
a.erase(q)  iterator  
a.erase(r)  iterator  
a.erase(q1, q2)  iterator  
void  Effects: Erases all elements in the container. Ensures: a.empty() is true  Linear in a.size().  
Returns: An iterator pointing to an element with key equivalent to
k, or b.end() if no such element exists.  
b.find(k, hk)  Returns: An iterator pointing to an element with key equivalent to k, or b.end() if no such element exists.  
a_tran.find(ke)  Returns: An iterator pointing to an element with key equivalent to
ke, or a_tran.end() if no such element exists.  
a_tran.find(ke, hke)  Returns: An iterator pointing to an element with key equivalent to ke, or a_tran.end() if no such element exists.  
size_type  
b.count(k, hk)  size_type  
a_tran.count(ke)  size_type  
a_tran.count(ke, hke)  size_type  
bool  Effects: Equivalent to b.find(k) != b.end()  
b.contains(k, hk)  bool  Effects: Equivalent to b.find(k) != b.end()  
a_tran.contains(ke)  bool  Effects: Equivalent to a_tran.find(ke) != a_tran.end()  
a_tran.contains(ke, hke)  bool  Effects: Equivalent to a_tran.find(ke, hke) != a_tran.end()  
Returns make_pair(b.end(), b.end()) if
no such elements exist.  Average case . Worst case
.  
b.equal_range(k, hk)  Returns make_pair(b.end(), b.end()) if
no such elements exist.  Average case . Worst case
.  
a_tran.equal_range(ke)  Returns make_pair(a_tran.end(), a_tran.end()) if
no such elements exist.  Average case
. Worst case .  
a_tran.equal_range(ke, hke)  Returns make_pair(a_tran.end(), a_tran.end()) if
no such elements exist.  Average case
. Worst case .  
size_type  Constant  
size_type  Constant  
size_type  Returns: The index of the bucket in which elements with keys equivalent to k would be found, if any such element existed.  Constant  
size_type  
If the bucket is empty, then
b.begin(n) == b.end(n).  Constant  
Constant  
const_local_iterator  If the bucket is empty, then
b.cbegin(n) == b.cend(n).  Constant  
const_local_iterator  Returns: An iterator which is the pasttheend
value for the bucket.  Constant  
float  Returns: The average number of elements per bucket.  Constant  
float  Returns: A positive number that the container attempts to keep the load factor
less than or equal to. The container automatically increases the
number of buckets as necessary to keep the load factor below this
number.  Constant  
a.max_load_factor(z)  void  May change the container's maximum load factor, using z as a hint.  Constant 
void  Average case linear in a.size(), worst case quadratic.  
void  Average case linear in a.size(), worst case quadratic. 
Subclause  Header(s)  
Iterator requirements  <iterator>  
Iterator primitives  
Iterator adaptors  
Stream iterators  
Range access 
Contiguous  → Random Access  → Bidirectional  → Forward  → Input 
→ Output 
Expression  Return type  Operational  Assertion/note 
semantics  pre/postcondition  
*r  unspecified  
++r  X& 
Expression  Return type  Operational  Assertion/note 
semantics  pre/postcondition  
a != b  contextually convertible to bool  !(a == b)  
*a  reference, convertible to T  
a>m  (*a).m  
++r  X&  Ensures: r is dereferenceable or r is pasttheend; 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; } 
Expression  Return type  Operational  Assertion/note 
semantics  pre/postcondition  
*r = o  result is not used  
++r  X&  addressof(r) == addressof(++r).  
r++  convertible to const X&  { X tmp = r; ++r; return tmp; }  
*r++ = o  result is not used 
Expression  Return type  Operational  Assertion/note 
semantics  pre/postcondition  
r++  convertible to const X&  { X tmp = r; ++r; return tmp; }  
*r++  reference 
Expression  Return type  Operational  Assertion/note 
semantics  pre/postcondition  
r  X&  
r  convertible to const X&  { X tmp = r; r; return tmp; }  
*r  reference 
Expression  Return type  Operational  Assertion/note 
semantics  pre/postcondition  
r += n  X&  { difference_type m = n; if (m >= 0) while (m) ++r; else while (m++) r; return r; }  
a + n n + a  X  { X tmp = a; return tmp += n; }  a + n == n + a. 
r = n  X&  return r += n;  
a  n  X  { X tmp = a; return tmp = n; }  
b  a  difference_type  return n  
a[n]  convertible to reference  *(a + n)  
a < b  contextually
convertible to bool  b  a > 0  < is a total ordering relation 
a > b  contextually
convertible to bool  b < a  
a >= b  contextually
convertible to bool  !(a < b)  
a <= b  contextually
convertible to bool.  !(a > b) 
Subclause  Header(s)  
Range access  <ranges>  
Requirements  
Range utilities  
Range factories  
Range adaptors 
Subclause  Header(s)  
Algorithms requirements  
Parallel algorithms  
Nonmodifying sequence operations  
Mutating sequence operations  <algorithm>  
Sorting and related operations  
Generalized numeric operations  <numeric>  
C library algorithms  <cstdlib> 
Subclause  Header(s)  
Requirements  
Floatingpoint environment  <cfenv>  
Complex numbers  <complex>  
Bit manipulation  <bit>  
Random number generation  <random>  
Numeric arrays  <valarray>  
Mathematical functions for  <cmath>  
floatingpoint types  <cstdlib> 
Expression  Return type  Pre/postcondition  Complexity 
T  compiletime  
Creates a seed sequence
with the same initial state as all other defaultconstructed seed sequences
of type S.  constant  
Creates a seed sequence
having internal state
that depends on some or all of the bits
of the supplied sequence .  
Same as S(il.begin(), il.end()).  same as S(il.begin(), il.end())  
void  Does nothing if rb == re. Otherwise,
fills the supplied sequence
with 32bit quantities
that depend on the sequence supplied to the constructor
and possibly also depend on the history
of generate's previous invocations.  
size_t  The number of 32bit units
that would be copied
by a call to r.param.  constant  
void  Copies to the given destination
a sequence of 32bit 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. 
Expression  Return type  Pre/postcondition  Complexity 
Creates an engine
with the same initial state
as all other defaultconstructed engines
of type E.  
Creates an engine
that compares equal to x.  
Creates an engine
with initial state determined by s.  
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  
void  same as E()  
void  same as E(s)  
void  same as E(q)  
T  per [rand.req.urng]  
void  no worse than the complexity
of z consecutive calls e()  
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.  
bool  !(x == y).  
reference to the type of os  With os.fmtflags set to
ios_base::decios_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.  
reference to the type of is  With is.fmtflags
set to ios_base::dec,
sets v's state
as determined by reading its textual representation from is. If bad input is encountered,
ensures that v's state is unchanged by the operation
and
calls is.setstate(ios::failbit)
(which may throw ios::failure ([iostate.flags])). If a textual representation written via os << x
was subsequently read via is >> v,
then x == v
provided that there have been no intervening invocations
of x or of v. Requires:
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. 
Expression  Return type  Pre/postcondition  Complexity 
T  compiletime  
P  compiletime  
Creates a distribution whose behavior is indistinguishable
from that of any other newly defaultconstructed distribution
of type D.  constant  
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  
void  constant  
P  no worse than the complexity of D(p)  
void  no worse than the complexity of D(p)  
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  
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  
T  Returns glb.  constant  
T  Returns lub.  constant  
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  
bool  !(x == y).  same as x == y.  
reference to the type of os  
reference to the type of is  If bad input is encountered,
ensures that d is unchanged by the operation
and
calls is.setstate(ios::failbit)
(which may throw ios::failure ([iostate.flags])). Requires: 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. 
Subclause  Header(s)  
Cpp17Clock requirements  
Timerelated traits  <chrono>  
Class template duration  
Class template time_point  
Clocks  
Civil calendar  
Class template time_of_day  
Time zones  
Formatting  
Parsing  
C library time utilities  <ctime> 
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::is_steady  const bool  
C1::now()  C1::time_point  Returns a time_point object representing the current point in time. 
Specifier  Replacement 
%a  The locale's abbreviated weekday name. If the value does not contain a valid weekday,
setstate(ios::failbit) is called. 
%A  The locale's full weekday name. If the value does not contain a valid weekday,
setstate(ios::failbit) is called. 
%b  The locale's abbreviated month name. If the value does not contain a valid month,
setstate(ios::failbit) is called. 
%B  The locale's full month name. If the value does not contain a valid month,
setstate(ios::failbit) is called. 
%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 weekbased year. If the result is a single digit it is prefixed by 0. 
%G  The ISO weekbased year as a decimal number. If the result is less than four digits
it is leftpadded with 0 to four digits. 
%h  Equivalent to %b. 
%H  The hour (24hour 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 (12hour 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  The day of the year as a decimal number. Jan 1 is 001. If the result is less than three digits,
it is leftpadded 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 newline character. 
%p  The locale's equivalent of the AM/PM designations associated with a 12hour clock. 
%r  The locale's 12hour clock time. 
%R  Equivalent to %H:%M. 
%S  Seconds as a decimal number. 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 horizontaltab character. 
%T  Equivalent to %H:%M:%S. 
%u  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 weekbased 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 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. 
%Y  The year as a decimal number. If the result is less than four digits
it is leftpadded with 0 to four digits. 
%z  The offset from UTC in the ISO 8601 format. For example 0430 refers to 4 hours 30 minutes behind UTC. If the offset is zero, +0000 is used. If the offset information is not available,
setstate(ios_base::failbit) shall be called. 
%Z  The time zone abbreviation. If the time zone abbreviation is not available,
setstate(ios_base::failbit) shall be called. 
%%  A % character. 
Flag  Parsed value 
%a  The locale's full or abbreviated caseinsensitive weekday name. 
%A  Equivalent to %a. 
%b  The locale's full or abbreviated caseinsensitive 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. 
%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 %Ed interprets
the locale's alternative representation of the day of the month. 
%D  Equivalent to %m/%d/%y. 
%e  
%F  Equivalent to %Y%m%d. 
%g  The last two decimal digits of the ISO weekbased 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 weekbased 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 (24hour 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 (12hour 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. 
%j  The day of the year as a decimal number. Jan 1 is 1. 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 white space character. 
%p  The locale's equivalent of the AM/PM designations associated with a 12hour clock. 
%r  The locale's 12hour 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 white space characters. 
%T  Equivalent to %H:%M:%S. 
%u  The modified command %Nu specifies
the maximum number of characters to read. Leading zeroes are permitted but not required. The modified command %Ou interprets
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. 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. 
%V  The ISO weekbased 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 modified command %Nw specifies
the maximum number of characters to read. 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. 
%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 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. 
%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]. 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]. 
%Z  The time zone abbreviation or name. A single word is parsed. This word can only contain characters
from the basic source character set ([lex.charset])
that are alphanumeric, or one of
'_', '/', '', or '+'. 
%%  A % character is extracted. 
Subclause  Header(s)  
Locales  <locale>  
Standard locale Categories  
C library locales  <clocale> 
Category  Includes facets 
collate  collate<char>, collate<wchar_t> 
ctype  ctype<char>, ctype<wchar_t> 
codecvt<char, char, mbstate_t>  
codecvt<char16_t, char8_t, mbstate_t>  
codecvt<char32_t, char8_t, 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> 
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<char16_t, char8_t, mbstate_t>  
codecvt_byname<char32_t, char8_t, 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> 
Value  Meaning 
ok  completed the conversion 
partial  not all source characters converted 
error  encountered a character in [from, from_end)
that it could not convert 
noconv  internT and externT are the same type, and input
sequence is identical to converted sequence 
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 
State  stdio equivalent 
basefield == oct  %o 
basefield == hex  %X 
basefield == 0  %i 
signed integral type  %d 
unsigned integral type  %u 
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 
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 
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 
Type  Length modifier 
long  l 
long long  ll 
unsigned long  l 
unsigned long long  ll 
long double  L 
otherwise  none 
Type(s)  State  stdio equivalent 
an integral type  showpos  + 
showbase  #  
a floatingpoint type  showpos  + 
showpoint  # 
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 
date_order()  Format 
no_order  "%m%d%y" 
dmy  "%d%m%y" 
mdy  "%m%d%y" 
ymd  "%y%m%d" 
ydm  "%y%d%m" 
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 
Subclause  Header(s)  
Requirements  
Forward declarations  <iosfwd>  
Standard iostream objects  <iostream>  
Iostreams base classes  <ios>  
Stream buffers  <streambuf>  
Formatting and manipulators  <istream>  
<ostream>  
<iomanip>  
String streams  <sstream>  
File streams  <fstream>  
Synchronized output streams  <syncstream>  
File systems  <filesystem>  
C library files  <cstdio>  
<cinttypes> 
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 floatingpoint output in fixedpoint 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 floatingpoint output in scientific notation 
showbase  generates a prefix indicating the numeric base of generated integer output 
showpoint  generates a decimalpoint character unconditionally in generated floatingpoint output 
showpos  generates a + sign in nonnegative 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 
Constant  Allowable values 
adjustfield  left  right  internal 
basefield  dec  oct  hex 
floatfield  scientific  fixed 
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. 
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 
out  open for output 
trunc  truncate an existing stream when opening 
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 
Expression  Return type  Operational  Assertion/note 
semantics  pre/postcondition  
P(o)  P  converts from offset  Effects: Valueinitializes the state object. 
P p(o); P p = o;  Effects: Valueinitializes the state object. Ensures: p == P(o)  
P()  P  P(0)  
P p;  P p(0);  
O(p)  streamoff  converts to offset  P(O(p)) == p 
p != q  convertible to 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) 
Element  Value 
rdbuf()  sb 
tie()  0 
rdstate()  
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 
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() 