__GNU_CXX::_TEMPORARY_BUFFER(3cxx)
π __gnu_cxx::_Temporary_buffer< _ForwardIterator, _Tp > π
okay bestie, sit DOWN, because we're about to talk about a little class from libstdc++, and she lives in section 3cxx of your man pages. yes this is the C++ corner of the manual, no we're not scared, we're thriving. β¨
πΈ NAME πΈ
__gnu_cxx::_Temporary_buffer< _ForwardIterator, _Tp > β the internal temp-buffer class that does the absolute most so your algorithms don't have to π«Ά
π SYNOPSIS π
#include <stl_tempbuf.h>
Inherited by __gnu_cxx::temporary_buffer< _ForwardIterator, _Tp >.
β¨ Public Types β¨
typedef pointer iteratorβ the iterator type, which is literally just the pointer type. minimal effort, iconic result πtypedef value_type * pointerβ a pointer tovalue_type. classic.typedef ptrdiff_t size_typeβ sizes here areptrdiff_t, as one does.typedef _Tp value_typeβ the value type is_Tp. no notes, she's consistent. π
π¦ Public Member Functions π¦
_Temporary_buffer (_ForwardIterator __seed, size_type __original_len)β the constructor! give her a seed iterator and an original length and she'll set you up.size_type _M_requested_size () constβ returns the size that was requested by the constructor; may be>size(). yes girl, requested β actual, keep up. πiterator begin ()β as per Table mumble.iterator end ()β as per Table mumble.size_type size () constβ as per Table mumble.
ngl the docs really said "Table mumble" three times and dipped π we respect the mystery tho.
π Protected Attributes π
struct std::_Temporary_buffer::_Impl _M_implβ the implementation guts. protected, so hands off, bestie. πsize_type _M_original_lenβ the original length you handed over at construction time. she remembers. π
π« Detailed Description π«
template<typename _ForwardIterator, typename _Tp>
class __gnu_cxx::_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.
fr fr, she's the backstage crew β you don't see her, but the show does not go on without her. β¨
π Constructor & Destructor Documentation π
std::_Temporary_buffer< _ForwardIterator, _Tp >::_Temporary_buffer (_ForwardIterator __seed, size_type __original_len)
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.
so likeβ¦ she might give you the whole thing, she might give you nothing. it's giving β¨surpriseβ¨ but that's just how it is. π
π 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().
the way that requested size can be BIGGER than actual sizeβ¦ she's ambitious, we love that for her. π₯
begin ()
template<typename _ForwardIterator, typename _Tp>
iterator
std::_Temporary_buffer< _ForwardIterator, _Tp >::begin ()
[inline]
As per Table mumble.
end ()
template<typename _ForwardIterator, typename _Tp>
iterator
std::_Temporary_buffer< _ForwardIterator, _Tp >::end ()
[inline]
As per Table mumble.
size () const
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.
and that's the whole page, bestie!! πΈ this one came out of the libstdc++ source, section 3cxx, and it's filed under that long dramatic __gnu_cxx::_Te...Iterator, _Tp >(3cxx) name because the title got truncated mid-vibe. π anyway β go read the temporary_buffer docs for more notes, and stay iconic. mwah. πβ¨π¦
π¦ where this page comes from
- ubuntu resolute: libstdc++-16-doc 16-20260322-1ubuntu1
- ubuntu stonking: libstdc++-16-doc 16.2.0-3ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms