STD::_TEMPORARY_BUFFER(3)

πŸ’– NAME πŸ’–

std::_Temporary_buffer< _ForwardIterator, _Tp > β€” okay so this is a lil template class from the Library Functions Manual, and it's literally just a scratch buffer that lives somewhere between "nothing" and "the whole thing", bestie. It's giving ✨internal plumbing✨ and we're obsessed.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <memory>

Inherited by __gnu_cxx::temporary_buffer< _ForwardIterator, _Tp >. Yes ma'am, it has a glow-up child class πŸ’…

🌸 Public Types 🌸

  • typedef pointer iterator β€” the iterator type is literally just pointer, no cap
  • typedef value_type * pointer β€” pointer = a pointer to value_type, iconic
  • typedef ptrdiff_t size_type β€” sizes are ptrdiff_t around here
  • typedef _Tp value_type β€” the value type is _Tp, periodt

πŸŽ€ Public Member Functions πŸŽ€

  • _Temporary_buffer (_ForwardIterator __seed, size_type __original_len) β€” constructor, makes the buffer, more on it below
  • size_type _M_requested_size () const β€” Returns the size requested by the constructor; may be >size().
  • iterator begin () β€” As per Table mumble.
  • iterator end () β€” As per Table mumble.
  • size_type size () const β€” As per Table mumble.

πŸ”₯ Protected Attributes πŸ”₯

  • struct std::_Temporary_buffer::_Impl _M_impl β€” the secret lil impl struct, protected obvi
  • size_type _M_original_len β€” the original length, kept safe and sound 🫢

✨ Detailed Description ✨

template<typename _ForwardIterator, typename _Tp>
class std::_Temporary_buffer< _ForwardIterator, _Tp >

"This class is used in two places: stl_algo.h and ext/memory, where it is wrapped as the temporary_buffer class. See temporary_buffer docs for more notes.

So yeah bestie, two whole places. And if you want the actual tea, the temporary_buffer docs are where it's at πŸ‘‘


πŸ’œ Constructor & Destructor Documentation πŸ’œ

template<typename _ForwardIterator, typename _Tp>
std::_Temporary_buffer< _ForwardIterator, _Tp >::_Temporary_buffer (
    _ForwardIterator __seed,
    size_type __original_len)

Constructs a temporary buffer of a size somewhere between zero and the given length. Not a promise of exactly __original_len, just... somewhere in that range, fr fr.

References begin(), and end().
Referenced by __gnu_cxx::temporary_buffer< _ForwardIterator, _Tp >::temporary_buffer().

🌈 Member Function Documentation 🌈

πŸ“ _M_requested_size

template<typename _ForwardIterator, typename _Tp>
size_type
std::_Temporary_buffer< _ForwardIterator, _Tp >::_M_requested_size () const [inline]

Returns the size requested by the constructor; may be >size().

🧚 begin

template<typename _ForwardIterator, typename _Tp>
iterator
std::_Temporary_buffer< _ForwardIterator, _Tp >::begin () [inline]

As per Table mumble.

Referenced by _Temporary_buffer().

⭐ end

template<typename _ForwardIterator, typename _Tp>
iterator
std::_Temporary_buffer< _ForwardIterator, _Tp >::end () [inline]

As per Table mumble.

Referenced by _Temporary_buffer().

πŸ’€ size

template<typename _ForwardIterator, typename _Tp>
size_type
std::_Temporary_buffer< _ForwardIterator, _Tp >::size () const [inline]

As per Table mumble.


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. Not a human, not a bestie, just Doxygen doing its lil thing πŸ€–πŸ’–


okay that's the whole page!! it came from the Library Functions Manual and it's a libstdc++ situation, so if you see std::_Temp...ator, _Tp >(3) floating around in your terminal that's just the header/footer doing its lil signature move πŸ’… mwah, go slay, 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