nullptr_t — the type of nullptr
In C23, nullptr_t from <stddef.h> names the type of nullptr, distinct from pointer and arithmetic types.
CKTIS / Knowledge base
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
In C23, nullptr_t from <stddef.h> names the type of nullptr, distinct from pointer and arithmetic types.
ptrdiff_t is the signed integer type for pointer subtraction. It measures distance in elements, not bytes.
short is a signed integer type equivalent to short int. It need not occupy exactly two bytes.
`signed char` stores small signed integers. It is a distinct type from both plain `char` and `unsigned char`.
size_t is the unsigned integer type returned by sizeof. Use it for object sizes and element counts.
uint16_t from <stdint.h> names an optional unsigned integer type with exactly 16 bits and a range of 0–65535.
uint32_t from <stdint.h> is an optional unsigned integer type with exactly 32 bits and no padding bits.
uint64_t from <stdint.h> stores values from 0 to 18446744073709551615. Availability of this exact-width type depends on the implementation.
uint8_t from <stdint.h> stores values 0–255 in exactly 8 bits. Availability of this type depends on the implementation.
uintptr_t is an optional unsigned type from <stdint.h> supporting conversion from void * to an integer and back.
unsigned char is an unsigned integer type occupying one C byte; a byte need not contain eight bits.
unsigned int stores values from 0 to UINT_MAX. Arithmetic in this type wraps rather than reporting an out-of-range result.
unsigned long stores nonnegative integers. ULONG_MAX specifies its maximum value; its width is not fixed.
unsigned long long is an unsigned integer type with at least 64 value bits and modular arithmetic.
unsigned short is an unsigned integer type with a range of at least 0–65535; it need not be exactly 16 bits wide.
void represents the absence of a value. It appears as a function return type, a marker for no parameters, and part of the pointer type void *.
std::convertible_to<From, To>, declared in <concepts>, requires both implicit conversion and conversion through static_cast to To, with consistent results. Merely supporting an explicit cast is not sufficient.
std::accumulate combines a half-open range with an initial value and returns the final accumulator. The type of init affects the type and precision of every step.
std::adjacent_difference writes the first element and then applies an operation to each current and previous element. It returns the iterator past the final output.
std::advance modifies an iterator passed by reference, moving it by n positions. It performs no bounds check and returns void.
std::align_val_t from <new> carries a required alignment to allocation and deallocation overloads. It is a distinct enumeration type that lets overloads distinguish an alignment argument from a storage-size argument.
std::all_of returns true when a predicate is true for every element of a range. Its result is also true for an empty range.
std::any stores one copyable value of an arbitrary type and preserves its exact type identity for a later any_cast. It can also be empty.
std::any_of returns true when a predicate is true for at least one element. An empty range always produces false.