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 186 of file ext/memory.
temporary_buffer | ( | _ForwardIterator | __first, | |
_ForwardIterator | __last | |||
) | [inline] |
Requests storage large enough to hold a copy of [first,last).
Definition at line 189 of file ext/memory.
~temporary_buffer | ( | ) | [inline] |
iterator begin | ( | ) | [inline, inherited] |
As per Table mumble.
Definition at line 112 of file stl_tempbuf.h.
References _Temporary_buffer::_M_buffer.
Referenced by std::inplace_merge(), std::stable_partition(), and std::stable_sort().
iterator end | ( | ) | [inline, inherited] |
As per Table mumble.
Definition at line 117 of file stl_tempbuf.h.
References _Temporary_buffer::_M_buffer, and _Temporary_buffer::_M_len.
size_type requested_size | ( | ) | const [inline, inherited] |
Returns the size requested by the constructor; may be >size().
Definition at line 107 of file stl_tempbuf.h.
References _Temporary_buffer::_M_original_len.
Referenced by std::stable_partition().
size_type size | ( | ) | const [inline, inherited] |
As per Table mumble.
Definition at line 102 of file stl_tempbuf.h.
References _Temporary_buffer::_M_len.
Referenced by std::inplace_merge(), std::stable_partition(), and std::stable_sort().