C++std::queue is a container adaptor implementing FIFO order: the first element inserted is the first removed. It supports insertion at the back, access to both ends, and removal from the front, without a public iterator interface.
Basic · C++23; repository compiler flag, production runtime not attestedC++std::ranges::copy copies elements in input order to a destination specified by an output iterator. It accepts either a whole range or an iterator and sentinel, and returns the final input and output positions.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::ranges::equal_range finds the half-open range of elements equivalent to a search value under a comparator. It supports ranges, iterator–sentinel pairs, and projections; it requires appropriately partitioned data, which sorting guarantees.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++`std::ranges::find` locates the first element equal to a supplied value, optionally after projection. The result is not a `bool`: an iterator points to the first match or marks the end if there is no match. The range overload instead returns `std::ranges::dangling` when passed an rvalue range that does not satisfy `borrowed_range`.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::ranges::greater is a function object from <functional> that compares two arguments in the reverse order of std::ranges::less. It requires compatible comparison operations described by std::totally_ordered_with.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::ranges::input_range describes a range whose iterator supports reading elements and advancing to subsequent positions. It does not guarantee multiple passes: reading may consume data, as with a stream view.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::ranges::is_sorted returns a bool indicating whether a range is ordered according to a comparator and projection. It does not sort the data; by default, it checks nondecreasing order and allows duplicates.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::ranges::less is a function object type from <functional> that compares two arguments. It supports compatible different types, requires std::totally_ordered_with, and returns bool.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::ranges::sort from <algorithm> sorts elements within an existing range. It accepts a whole range or an iterator and sentinel, plus an optional comparator and key projection.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::ranges::subrange from <ranges> combines a starting iterator and an ending sentinel into a view of [first, last). It does not copy elements into a new container; it lets you pass a selected portion of data as one object.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++C++23 std::ranges::to constructs an object, usually a container, from an input range. It lets you finish a view pipeline with a concrete result, specifying either the full container type or a template whose arguments will be deduced.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::ranges::transform computes values from one range or corresponding elements of two ranges and writes them through an output iterator. It is an eager algorithm, not a lazy view.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::ranges::view_interface is a CRTP base for custom views. It supplies convenience members from range operations, but their availability depends on the capabilities of the iterator and sentinel.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::recursive_mutex lets the same thread acquire the same mutex repeatedly. Other threads can acquire it only after every ownership level has been released. Each successful acquisition requires a separate unlock.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::reduce from <numeric> combines a range and an initial value into one result. It may reorder and regroup operations, so it is not a substitute for std::accumulate when evaluation order matters.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::reference_wrapper stores a reference without owning its target. Learn std::ref, std::cref, and the difference between modifying the referenced object and changing which object the wrapper references.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::remove moves retained elements to the front of a range and returns its new logical end. It does not shrink the container; use erase to actually remove the trailing elements.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::remove_if moves retained elements to the front of a range and returns its new logical end. It does not change the container's size; for std::vector, erase completes the removal.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::replace from <algorithm> replaces every occurrence of a specified value within an iterator range. It modifies existing elements, preserves the container's size, and returns void.
Basic · C++23; repository compiler flag, production runtime not attestedC++std::replace_if from <algorithm> replaces elements satisfying a predicate in place with one supplied value. It preserves the number of elements and returns void.
Basic · C++23; repository compiler flag, production runtime not attestedC++std::reverse from <algorithm> reverses the elements of [first, last) in place. It requires bidirectional iterators and elements that can be swapped, and returns void.
Basic · C++23; repository compiler flag, production runtime not attestedC++std::reverse_iterator::base returns a copy of the stored underlying iterator. Its position is one element farther in the forward direction than the element accessed through the reverse iterator.
Intermediate · C++23; repository compiler flag, production runtime not attestedC++std::right sets right alignment on an output stream: padding characters appear before the value. The setting persists, while the field width is specified separately, for example with std::setw.
Basic · C++23; repository compiler flag, production runtime not attestedC++std::rotate from <algorithm> rearranges a range in place: the part starting at middle moves before the part starting at first. It preserves order within both parts and returns an iterator to their new boundary.
Basic · C++23; repository compiler flag, production runtime not attested