C++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.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++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.
Intermediate · C++23C++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.
Intermediate · C++23C++std::advance modifies an iterator passed by reference, moving it by n positions. It performs no bounds check and returns void.
Intermediate · C++23C++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.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++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.
Intermediate · C++23C++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.
Intermediate · C++23C++std::any_of returns true when a predicate is true for at least one element. An empty range always produces false.
Intermediate · C++23C++std::apply expands a tuple-like object into the arguments of a callable and returns the result of that invocation.
Intermediate · C++23C++std::array is a contiguous container whose element count is known at compile time. It does not allocate a separate dynamic buffer.
Intermediate · C++23C++std::as_const returns const T& to an existing lvalue without copying. Its rvalue overload is deleted to prevent a dangling reference.
Intermediate · C++23C++std::async starts a callable according to a std::launch policy and returns a future holding either its result or its exception.
Advanced · C++23C++std::atomic provides indivisible loads, stores, and read-modify-write operations on one object and lets code specify memory ordering.
Advanced · C++23C++std::atomic_ref creates a non-owning atomic view of an existing trivially copyable object.
Advanced · C++23C++The std::shared_ptr overloads of std::atomic_store_explicit and std::atomic_load_explicit atomically replace and retrieve a shared handle. Deprecated in C++23, they protect the handle and ownership, not arbitrary operations on the pointed-to object.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::atomic_thread_fence establishes memory-ordering constraints without reading or writing a specified object. Inter-thread synchronization requires appropriately connected atomic operations; fences alone are not enough.
Advanced · C++23; repository compiler flag, production runtime not attestedC++std::back_inserter creates an output iterator whose assignment calls push_back on the referenced container.
Intermediate · C++23C++std::back_insert_iterator is an output iterator adaptor that turns value assignment into a container push_back call. It lets you append elements using *out++ = value without overwriting existing elements.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::bad_alloc from <new> reports failure to allocate storage. Learn how to catch it by const reference, why what() has no portable fixed text, and how throwing allocation differs from std::nothrow.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::bad_optional_access is the exception thrown by value() when std::optional contains no value. Distinguish this checked access from the * and -> operators, which require a value to be present.
Basic · C++23; repository compiler flag, production runtime not attestedC++std::barrier synchronizes a fixed group of participants at each phase boundary and then automatically starts the next phase.
Advanced · C++23C++std::basic_ios::tie queries or changes a tied output stream. The tie allows its buffer to be flushed before input; nullptr removes the tie, and the setter overload returns the previous pointer.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::basic_ostream::flush requests synchronization of a stream buffer and returns a reference to the same stream. It does not append a newline; synchronization failure is reported through badbit.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::basic_string::operator+= appends characters to an existing string and returns a reference to it. It accepts another string, a single character, a null-terminated string, an initializer list, or a string-view-compatible type.
Basic · C++23; repository compiler flag, production runtime not attested