__GNU_CXX::_TEMPORARY_BUFFER(3cxx)

πŸ“¦
version 16-20260322 Β· 3 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– __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 to value_type. classic.
  • typedef ptrdiff_t size_type β€” sizes here are ptrdiff_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