<algorithm> | <forward_list> | <numbers> | <string> | |
<any> | <fstream> | <numeric> | <string_view> | |
<array> | <functional> | <optional> | <strstream> | |
<atomic> | <future> | <ostream> | <syncstream> | |
<barrier> | <initializer_list> | <queue> | <system_error> | |
<bit> | <iomanip> | <random> | <thread> | |
<bitset> | <ios> | <ranges> | <tuple> | |
<charconv> | <iosfwd> | <ratio> | <typeindex> | |
<chrono> | <iostream> | <regex> | <typeinfo> | |
<codecvt> | <istream> | <scoped_allocator> | <type_traits> | |
<compare> | <iterator> | <semaphore> | <unordered_map> | |
<complex> | <latch> | <set> | <unordered_set> | |
<concepts> | <limits> | <shared_mutex> | <utility> | |
<condition_variable> | <list> | <source_location> | <valarray> | |
<coroutine> | <locale> | <span> | <variant> | |
<deque> | <map> | <sstream> | <vector> | |
<exception> | <memory> | <stack> | <version> | |
<execution> | <memory_resource> | <stdexcept> | ||
<filesystem> | <mutex> | <stop_token> | ||
<format> | <new> | <streambuf> |
<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 | ||
Types | <cstddef> | ||
Implementation properties | <cfloat>, <climits>, <limits>, <version> | ||
Integer types | <cstdint> | ||
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 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 | < is a strict weak ordering relation ([alg.sorting]) |
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 | |
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) |
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 | |
Expression | Return type | Return value | Post-condition | |
t = v | T& | t | t is equivalent to v, the value of v is unchanged |
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 | 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 | ||
h(u) | size_t | Shall not modify u. |
Variable | Definition | |
T, U, C | any cv-unqualified 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 | a value of type XX::const_pointer
obtained by conversion from a value p | |
r | a value of type T&
obtained by the expression *p | |
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-/post-condition | ||||
X::pointer | T* | |||
X::const_pointer | X::pointer is convertible to X::const_pointer | pointer_traits<X::pointer>::rebind<const T> | ||
X::void_pointer Y::void_pointer | 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& | |||
p->m | type of T::m | Preconditions: (*p).m is well-defined. equivalent to (*p).m | ||
q->m | type of T::m | Preconditions: (*q).m is well-defined. equivalent to (*q).m | ||
static_cast<X::pointer>(w) | X::pointer | static_cast<X::pointer>(w) == p | ||
static_cast<X::const_pointer>(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 | Memory is allocated for an array of n T
and such an object is created
but array elements are not constructed. | ||
a.allocate(n, y) | X::pointer | a.allocate(n) | ||
a.deallocate(p,n) | (not used) | |||
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 | |||
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. Postconditions: u == a | |||
X u(b); | Shall not exit via an exception. Postconditions: Y(u) == b, u == X(b) | |||
X u(std::move(a)); X u = std::move(a); | ||||
X u(std::move(b)); | ||||
a.construct(c, args) | (not used) | construct_at(c, std::forward<Args>(args)...) | ||
a.destroy(c) | (not used) | Effects: Destroys the object at c | destroy_at(c) | |
a.select_on_container_copy_construction() | X | return a; | ||
X::propagate_on_container_copy_assignment | Identical to or derived from true_type or false_type | false_type | ||
X::propagate_on_container_move_assignment | Identical to or derived from true_type or false_type | false_type | ||
X::propagate_on_- container_swap | Identical to or derived from true_type or false_type | 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 |