STD::OSTREAMBUF_ITERATOR(3)
π std::ostreambuf_iterator< _CharT, _Traits > π
okay so bestie, welcome to the libstdc++ manual, section 3, Library Functions Manual β yes that's the manual name, and yeah the title line is the whole std::ostreambuf_iterator< _CharT, _Traits > thing, we're folding it in right here, you're welcome π«Ά
β¨ NAME β¨
std::ostreambuf_iterator< _CharT, _Traits > β it's giving output iterator semantics for streambufs. literally that's the whole job. no cap. π
β¨ SYNOPSIS β¨
#include <iterator>
Inherits std::iterator< output_iterator_tag, void, void, void, void >. so it's an iterator, it said what it said π
πΈ Public Types πΈ
typedef output_iterator_tag iterator_categoryβ one of the tag types, it's literally the category tag bestie.typedef void pointerβ this type represents a pointer-to-value_type.typedef void referenceβ this type represents a reference-to-value_type.typedef void value_typeβ the type "pointed to" by the iterator.using difference_typeβ public typedefs.typedef _CharT char_typeβ public typedefs.typedef _Traits traits_typeβ public typedefs.typedef basic_streambuf< _CharT, _Traits > streambuf_typeβ public typedefs.typedef basic_ostream< _CharT, _Traits > ostream_typeβ public typedefs.
π¦ Public Member Functions π¦
ostreambuf_iterator (ostream_type &__s) noexceptβ construct output iterator from an ostream β¨ostreambuf_iterator (streambuf_type *__s) noexceptβ construct output iterator from a streambuf β¨ostreambuf_iterator & _M_put (const _CharT *__ws, streamsize __len)β the internal putter, it's doing the work behind the scenes πbool failed () const noexceptβ returntrueif the previousoperator=()failed πostreambuf_iterator & operator* ()β return*this. that's it. that's the function.ostreambuf_iterator & operator++ ()β return*this. again. iconic behaviour honestly.ostreambuf_iterator & operator++ (int)β return*this. third time's the charm πostreambuf_iterator & operator= (_CharT __c)β write character to streambuf. callsstreambuf.sputc(). this is the main character right here π
π Friends π
template<typename _CharT2> __gnu_cxx::__enable_if< __is_char< _CharT2 >::__value, ostreambuf_iterator< _CharT2 > >::__type copy
(istreambuf_iterator< _CharT2 >, istreambuf_iterator< _CharT2 >,
ostreambuf_iterator< _CharT2 >)
π Detailed Description π
template<typename _CharT, typename _Traits>
class std::ostreambuf_iterator< _CharT, _Traits >
"Provides output iterator semantics for streambufs." β that's the official vibe check and it passed β
π Member Typedef Documentation π
- ```cpp template<typename _CharT, typename _Traits> typedef _CharT std::ostreambuf_iterator< _CharT, _Traits >::char_type
public typedefs.
- ```cpp
template<typename _CharT, typename _Traits> using std::ostreambuf_iterator<
_CharT, _Traits >::difference_type
public typedefs.
- ```cpp typedef output_iterator_tag std::iterator< output_iterator_tag, void, void, void, void >::iterator_category [inherited]
one of the tag types.
- ```cpp
template<typename _CharT, typename _Traits> typedef basic_ostream<_CharT,
_Traits> std::ostreambuf_iterator< _CharT, _Traits >::ostream_type
public typedefs.
- ```cpp typedef void std::iterator< output_iterator_tag, void, void, void, void
::pointer [inherited]
this type represents a pointer-to-`value_type`.
- ```cpp
typedef void std::iterator< output_iterator_tag, void, void, void, void
>::reference [inherited]
this type represents a reference-to-value_type.
- ```cpp template<typename _CharT, typename _Traits> typedef basic_streambuf<_CharT, _Traits> std::ostreambuf_iterator< _CharT, _Traits >::streambuf_type
public typedefs.
- ```cpp
template<typename _CharT, typename _Traits> typedef _Traits
std::ostreambuf_iterator< _CharT, _Traits >::traits_type
public typedefs.
- ```cpp typedef void std::iterator< output_iterator_tag, void, void, void, void
::value_type [inherited]
the type "pointed to" by the iterator.
---
# β Constructor & Destructor Documentation β
- ```cpp
template<typename _CharT, typename _Traits> std::ostreambuf_iterator<
_CharT, _Traits >::ostreambuf_iterator (ostream_type & __s) [inline],
[noexcept]
construct output iterator from ostream π
- ```cpp template<typename _CharT, typename _Traits> std::ostreambuf_iterator< _CharT, _Traits >::ostreambuf_iterator (streambuf_type * __s) [inline], [noexcept]
construct output iterator from streambuf π
---
# π₯ Member Function Documentation π₯
- ```cpp
template<typename _CharT, typename _Traits> bool std::ostreambuf_iterator<
_CharT, _Traits >::failed () const [inline], [nodiscard], [noexcept]
return true if previous operator=() failed.
Referenced by std::basic_ostream< _CharT, _Traits >::operator<<().
- ```cpp template<typename _CharT, typename _Traits> ostreambuf_iterator & std::ostreambuf_iterator< _CharT, _Traits >::operator* () [inline], [nodiscard]
return `*this`.
- ```cpp
template<typename _CharT, typename _Traits> ostreambuf_iterator &
std::ostreambuf_iterator< _CharT, _Traits >::operator++ () [inline]
return *this.
- ```cpp template<typename _CharT, typename _Traits> ostreambuf_iterator & std::ostreambuf_iterator< _CharT, _Traits >::operator++ (int ) [inline]
return `*this`.
- ```cpp
template<typename _CharT, typename _Traits> ostreambuf_iterator &
std::ostreambuf_iterator< _CharT, _Traits >::operator= (_CharT __c)
[inline]
write character to streambuf. calls streambuf.sputc().
π Author π
generated automatically by Doxygen for libstdc++ from the source code. not a human, just vibes and a parser π«Ά
okay bestie that's the whole page, every single flag, typedef, function and inherited thing accounted for, no skips, no cap. this was libstdc++ manual page std::ostre..., _Traits >(3), and yeah the footer was doing the same std::ostre..., _Traits >(3) thing with libstdc++ on the left, so consider yourself formally dismissed π
β¨ slay, go write to a streambuf or something π¦
π¦ where this page comes from
- arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
- fedora 44: libstdc++-docs 16.0.1-0.10.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- fedora 44: libstdc++-docs 16.2.1-2.fc44
- fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms