libstdc++
|
#include <memory>
Public Types | |
typedef pointer | iterator |
typedef value_type * | pointer |
typedef ptrdiff_t | size_type |
typedef _Tp | value_type |
Public Member Functions | |
temporary_buffer (_ForwardIterator __first, _ForwardIterator __last) | |
~temporary_buffer () | |
iterator | begin () |
iterator | end () |
size_type | requested_size () const |
size_type | size () const |
Protected Attributes | |
struct std::_Temporary_buffer::_Impl | _M_impl |
size_type | _M_original_len |
This class provides similar behavior and semantics of the standard functions get_temporary_buffer() and return_temporary_buffer(), but encapsulated in a type vaguely resembling a standard container.
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.
|
inherited |
Definition at line 196 of file stl_tempbuf.h.
|
inherited |
Definition at line 195 of file stl_tempbuf.h.
|
inherited |
Definition at line 197 of file stl_tempbuf.h.
|
inherited |
Definition at line 194 of file stl_tempbuf.h.
|
inline |
Requests storage large enough to hold a copy of [first,last).
Definition at line 189 of file ext/memory.
|
inline |
Destroys objects and frees storage.
Definition at line 195 of file ext/memory.
|
inlineinherited |
As per Table mumble.
Definition at line 235 of file stl_tempbuf.h.
Referenced by std::_Temporary_buffer< _ForwardIterator, _Tp >::_Temporary_buffer().
|
inlineinherited |
As per Table mumble.
Definition at line 240 of file stl_tempbuf.h.
Referenced by std::_Temporary_buffer< _ForwardIterator, _Tp >::_Temporary_buffer().
|
inlineinherited |
Returns the size requested by the constructor; may be >size().
Definition at line 230 of file stl_tempbuf.h.
|
inlineinherited |
As per Table mumble.
Definition at line 225 of file stl_tempbuf.h.
|
protectedinherited |
Definition at line 200 of file stl_tempbuf.h.