C++std::to_string from <string> returns a number's textual representation as a std::string. This entry covers C++23, including floating-point formatting limitations and the distinction from the newer working draft.
Basic · C++23; repository compiler flag, production runtime not attestedC++std::to_underlying, declared in <utility>, converts an enumeration value to its exact underlying type. Available since C++23, it is constexpr and noexcept; it neither forces the result to int nor checks whether the value corresponds to a named enumerator.
Basic · C++23; repository compiler flag, production runtime not attestedC++std::toupper from <cctype> returns a character's uppercase equivalent using the current C locale. Its argument must equal EOF or be representable as unsigned char; its return type is int.
Basic · C++23; repository compiler flag, production runtime not attestedC++std::transform from <algorithm> writes the results of a unary or binary operation into an output range. It neither creates a container nor automatically increases its size.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::transform_reduce from <numeric> transforms elements of one range or corresponding pairs from two ranges, then combines the results with init. The reduction order and grouping are unspecified.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::tuple from <tuple> groups a fixed number of elements whose types may differ. std::get provides access, while structured bindings let you give the elements local names.
Basic · C++23; repository compiler flag, production runtime not attestedC++std::u8string is an alias for std::basic_string<char8_t> from <string>. It stores UTF-8 code units but does not validate the encoding; size() does not count user-perceived characters.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::unexpected<E> from <expected> wraps an error value to construct std::expected<T, E> in its failure state. It distinguishes an error from a successful result even when T and E are the same type.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::unique keeps the first element of each consecutive group of equivalent elements. It returns the new logical end of the range without reducing the container's size.
Basic · C++23; repository compiler flag, production runtime not attestedC++std::unique_lock is a movable but noncopyable RAII object from <mutex> that manages mutex lock ownership. It supports deferred locking, unlocking before scope exit, and locking again. Its destructor unlocks the mutex only when the object still owns the lock.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::unique_ptr is an exclusively owning smart pointer that automatically disposes of its resource. It cannot be copied, but ownership can be moved to another pointer.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::unordered_map stores key–value pairs without a guaranteed order. Learn non-inserting lookup, the difference between operator[] and at, and how bucket management affects iterator validity.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::unordered_multimap stores key–value pairs and permits multiple entries with equivalent keys. It provides hash-based lookup but does not keep keys sorted. Use equal_range to retrieve every matching entry.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::unordered_multiset stores keys while allowing multiple equivalent occurrences. It supports lookup and removal without maintaining sorted order, and requires the hash function to agree with the key equivalence predicate.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::unordered_set stores unique keys using hashing. It supports membership checks, insertion, and removal without guaranteeing iteration order. Common operations have constant average complexity but linear worst-case complexity.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++`std::upper_bound` finds the partition boundary for the search value: it returns an iterator to the first element for which `value` compares less than that element, or `last` if no such element exists. With the default comparison on numbers sorted in ascending order, this is the first number greater than `value`.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::uppercase is a stream manipulator that selects uppercase letters in formatted numeric output, such as hexadecimal digits A–F and the exponent marker E. It does not transform text or select a number base; the setting remains active until changed.
Basic · C++23; repository compiler flag, production runtime not attestedC++std::variant stores a value of one of the alternatives specified by its template parameters and manages that value's lifetime. It models data such as “number or text” and provides checked ways to inspect and handle the active alternative.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::vector manages a resizable sequence of elements. Learn the difference between size and capacity, how to add and remove elements, how iterators provide access, and when pointers and references become invalid.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++The std::vector<bool> specialization targets space savings, but mutable element access returns a proxy object rather than bool&.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::vformat from <format> builds a string from a format string and a std::format_args argument pack. It accepts a pattern determined at runtime and reports invalid formatting for the supplied arguments through std::format_error.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::views::all adapts a range to the view interface while retaining every element. Its result can be a copy or move of an existing view, a reference view, or an owning view; that choice determines how data lifetime must be managed.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++C++23 std::views::chunk creates a lazy range of views over successive, non-overlapping groups of n elements. The final chunk may be shorter; n must be positive.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::views::drop creates a view of a range without its first N elements, without erasing them from the container. Use either the two-argument call or pipeline syntax. The number of elements to skip must be nonnegative.
Intermediate · C++23; repository compiler flag, production runtime not attested