std::output_iterator(3)
π NAME π
okay so welcome to the std::output_iterator(3) page, straight from the C++ Standard Libary manual β yes, that's the manual name folded in near the top, and it's giving OG header energy. The star of the show is std::output_iterator β literally std::output_iterator, no cap π
π Synopsis π
Defined in header <iterator> bestie:
template< class I, class T >
concept output_iterator =
std::input_or_output_iterator<I> &&
std::indirectly_writable<I, T> &&
(since C++20)
requires(I i, T&& t) {
*i++ = std::forward<T>(t); /* not required to be
equality-preserving */
};
So the output_iterator concept is a refinement of input_or_output_iterator, adding the requirement that it can be used to write values of type and value category encoded by T (via indirectly_writable). equality_comparable is not required. Not me checking for equality, because we literally don't need it π
π¦ Notes π¦
Unlike the LegacyOutputIterator requirements, the output_iterator concept does not require that the iterator category tag be defined. No cap.
Algorithms on output iterators should be single pass. Literally one pass, bestie β don't make it weird π«Ά
π See also π
input_or_output_iteratorβ specifies that objects of a type can be incremented and dereferenced(C++20)(concept).
source/version/date check, bestie: http://cppreference.com Β· version/date 2024.06.10 Β· page std::output_iterator(3). mwah, periodt πβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms