Public Member Functions | |
temporary_buffer (ForwardIterator first, ForwardIterator last) | |
Requests storage large enough to hold a copy of [first,last). | |
~temporary_buffer () | |
Destroys objects and frees storage. | |
ptrdiff_t | size () const |
As per Table mumble. | |
ptrdiff_t | requested_size () const |
Returns the size requested by the constructor; may be >size(). | |
Type * | begin () |
As per Table mumble. | |
Type * | end () |
As per Table mumble. |
By default, a temporary_buffer<Iter> stores space for objects of whatever type the Iter iterator points to. It is constructed from a typical [first,last) range, and provides the begin(), end(), size() functions, as well as requested_size(). For non-trivial types, copies of *first will be used to initialize the storage.
malloc
is used to obtain underlying storage.
Like get_temporary_buffer(), not all the requested memory may be available. Ideally, the created buffer will be large enough to hold a copy of [first,last), but if size() is less than requested_size(), then this didn't happen.
Definition at line 158 of file ext/memory.
__gnu_cxx::temporary_buffer< ForwardIterator, Type >::temporary_buffer | ( | ForwardIterator | first, | |
ForwardIterator | last | |||
) | [inline] |
Requests storage large enough to hold a copy of [first,last).
Definition at line 161 of file ext/memory.
__gnu_cxx::temporary_buffer< ForwardIterator, Type >::~temporary_buffer | ( | ) | [inline] |
Type* std::Temporary_buffer< ForwardIterator, Type >::begin | ( | ) | [inline, inherited] |
Type* std::Temporary_buffer< ForwardIterator, Type >::end | ( | ) | [inline, inherited] |
ptrdiff_t std::Temporary_buffer< ForwardIterator, Type >::requested_size | ( | ) | const [inline, inherited] |
Returns the size requested by the constructor; may be >size().
Definition at line 109 of file stl_tempbuf.h.
ptrdiff_t std::Temporary_buffer< ForwardIterator, Type >::size | ( | ) | const [inline, inherited] |