STD::ISTREAMBUF_ITERATOR(3)

✨ std::istreambuf_iterator< _CharT, _Traits > ✨

okay bestie, welcome to the std::istreambuf_iterator< _CharT, _Traits > page from the libstdc++ Library Functions Manual, section 3 πŸ’… this is the iterator that just gets streambufs, no cap.


🌸 NAME 🌸

std::istreambuf_iterator< _CharT, _Traits > β€” Provides input iterator semantics for streambufs. πŸ¦‹


πŸ’– SYNOPSIS πŸ’–

#include <iterator>

She inherits from std::iterator< input_iterator_tag, _CharT, _Traits::off_type, _CharT *, _CharT >. family tree ate πŸ’…

πŸŽ€ Public Types πŸŽ€

  • typedef _Traits::off_type difference_type β€” Distance between iterators is represented as this type. the lil gap-between-yall type 🫢
  • typedef input_iterator_tag iterator_category β€” One of the tag types. it's giving "input iterator" energy, obviously ✨
  • typedef _CharT reference β€” This type represents a reference-to-value_type. πŸ“
  • typedef _CharT value_type β€” The type pointed to "by the iterator". (yes the original manpage mashed those words together, iconic typo behavior, we respect it πŸ’€)
  • using pointer β€” Public typedefs. ✨
  • typedef _CharT char_type β€” Public typedefs. 🌸
  • typedef _Traits traits_type β€” Public typedefs. 🌈
  • typedef _Traits::int_type int_type β€” Public typedefs. ⭐
  • typedef basic_streambuf< _CharT, _Traits > streambuf_type β€” Public typedefs. 🧚
  • typedef basic_istream< _CharT, _Traits > istream_type β€” Public typedefs. πŸ’œ

πŸ¦‹ Public Member Functions πŸ¦‹

  • constexpr istreambuf_iterator () noexcept β€” Construct end of input stream iterator. the end-of-stream girly 🫢
  • istreambuf_iterator (const istreambuf_iterator &) noexcept=default β€” copy it, bestie πŸ’…
  • constexpr istreambuf_iterator (default_sentinel_t) noexcept β€” sentinel-coded, periodt ✨
  • istreambuf_iterator (istream_type &__s) noexcept β€” Construct start of input stream iterator. the start-of-stream girly πŸŽ€
  • istreambuf_iterator (streambuf_type *__s) noexcept β€” Construct start of streambuf iterator. πŸ“
  • bool equal (const istreambuf_iterator &__b) const β€” Return true both iterators are end or both are not end. matchy-matchy or nothin πŸ’–
  • char_type operator* () const β€” Return the current character pointed to by iterator. This returns streambuf.sgetc(). It cannot be assigned. NB: The result of operator*() on an end of stream is undefined. ⚠️ bestie do NOT deref the end, that's undefined behavior fr fr 😭
  • istreambuf_iterator & operator++ () β€” Advance the iterator. Calls streambuf.sbumpc(). πŸ”₯
  • istreambuf_iterator operator++ (int) β€” Advance the iterator. Calls streambuf.sbumpc(). πŸ”₯
  • istreambuf_iterator & operator= (const istreambuf_iterator &) noexcept=default β€” assign it, slay πŸ’…

πŸ‘‘ Friends πŸ‘‘

  • template<bool _IsMove, typename _CharT2> __gnu_cxx::__enable_if< __is_char< _CharT2 >::__value, _CharT2 * >::__type __copy_move_a2 (istreambuf_iterator< _CharT2 >, istreambuf_iterator< _CharT2 >, _CharT2 *) 🌟
  • template<typename _CharT2, typename _Size> __gnu_cxx::__enable_if< __is_char< _CharT2 >::__value, _CharT2 * >::__type __copy_n_a (istreambuf_iterator< _CharT2 >, _Size, _CharT2 *, bool) 🌟
  • template<typename _CharT2, typename _Distance> __gnu_cxx::__enable_if< __is_char< _CharT2 >::__value, void >::__type advance (istreambuf_iterator< _CharT2 > &, _Distance) 🌟
  • 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 >) 🌟
  • template<typename _CharT2> __gnu_cxx::__enable_if< __is_char< _CharT2 >::__value, istreambuf_iterator< _CharT2 > >::__type find (istreambuf_iterator< _CharT2 >, istreambuf_iterator< _CharT2 >, const _CharT2 &) 🌟
  • bool operator== (const istreambuf_iterator &__i, default_sentinel_t) 🌟

🌈 Detailed Description 🌈

template<typename _CharT, typename _Traits>
    class std::istreambuf_iterator< _CharT, _Traits >"Provides input
    iterator semantics for streambufs.

(yes the quote mark is just vibing there in the original, we keep it exactly as-is, no notes πŸ’€)


⭐ Member Typedef Documentation ⭐

  • template<typename _CharT, typename _Traits> typedef _CharT std::istreambuf_iterator< _CharT, _Traits >::char_type β€” Public typedefs. πŸŽ€
  • typedef _Traits::off_type std::iterator< input_iterator_tag, _CharT, _Traits::off_type, _CharT *, _CharT >::difference_type [inherited] β€” Distance between iterators is represented as this type. 🫢
  • template<typename _CharT, typename _Traits> typedef _Traits::int_type std::istreambuf_iterator< _CharT, _Traits >::int_type β€” Public typedefs. 🌸
  • template<typename _CharT, typename _Traits> typedef basic_istream<_CharT, _Traits> std::istreambuf_iterator< _CharT, _Traits >::istream_type β€” Public typedefs. πŸ’–
  • typedef input_iterator_tag std::iterator< input_iterator_tag, _CharT, _Traits::off_type, _CharT *, _CharT >::iterator_category [inherited] β€” One of the tag types. ✨
  • template<typename _CharT, typename _Traits> using std::istreambuf_iterator< _CharT, _Traits >::pointer β€” Public typedefs. πŸ’…
  • typedef _CharT std::iterator< input_iterator_tag, _CharT, _Traits::off_type, _CharT *, _CharT >::reference [inherited] β€” This type represents a reference-to-value_type. πŸ“
  • template<typename _CharT, typename _Traits> typedef basic_streambuf<_CharT, _Traits> std::istreambuf_iterator< _CharT, _Traits >::streambuf_type β€” Public typedefs. 🧚
  • template<typename _CharT, typename _Traits> typedef _Traits std::istreambuf_iterator< _CharT, _Traits >::traits_type β€” Public typedefs. 🌈
  • typedef _CharT std::iterator< input_iterator_tag, _CharT, _Traits::off_type, _CharT *, _CharT >::value_type [inherited] β€” The type "pointed to" by the iterator. πŸ‘‘

🧚 Constructor & Destructor Documentation 🧚

  • template<typename _CharT, typename _Traits> std::istreambuf_iterator< _CharT, _Traits >::istreambuf_iterator () [inline], [constexpr], [noexcept] β€” Construct end of input stream iterator. Referenced by equal(), and operator++(). 🫢
  • template<typename _CharT, typename _Traits> std::istreambuf_iterator< _CharT, _Traits >::istreambuf_iterator (istream_type & __s) [inline], [noexcept] β€” Construct start of input stream iterator. πŸŽ€
  • template<typename _CharT, typename _Traits> std::istreambuf_iterator< _CharT, _Traits >::istreambuf_iterator (streambuf_type * __s) [inline], [noexcept] β€” Construct start of streambuf iterator. πŸ“

πŸ’œ Member Function Documentation πŸ’œ

  • template<typename _CharT, typename _Traits> bool std::istreambuf_iterator< _CharT, _Traits >::equal (const istreambuf_iterator< _CharT, _Traits > & __b) const [inline], [nodiscard] β€” Return true both iterators are end or both are not end. References istreambuf_iterator(). πŸ’–
  • template<typename _CharT, typename _Traits> char_type std::istreambuf_iterator< _CharT, _Traits >::operator* () const [inline], [nodiscard] β€” Return the current character pointed to by iterator. This returns streambuf.sgetc(). It cannot be assigned. NB: The result of operator*() on an end of stream is undefined. ⚠️
  • template<typename _CharT, typename _Traits> istreambuf_iterator & std::istreambuf_iterator< _CharT, _Traits >::operator++ () [inline] β€” Advance the iterator. Calls streambuf.sbumpc(). πŸ”₯
  • template<typename _CharT, typename _Traits> istreambuf_iterator std::istreambuf_iterator< _CharT, _Traits >::operator++ (int ) [inline] β€” Advance the iterator. Calls streambuf.sbumpc(). References istreambuf_iterator(). πŸ”₯

🌟 Author 🌟

Generated automatically by Doxygen for libstdc++ from the source code. πŸ€–βœ¨


okay that's the whole page bestie, every flag, type, friend and footnote accounted for, we left nothing behind, periodt πŸ’…

and that's a wrap on the libstdc++ version of std::istre..., _Traits >(3) from libstdc++ β€” mwah, go read some streambufs, ily πŸ«ΆπŸŽ€πŸ’–

πŸ“¦ 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