GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing cplusplus.com — std::get_temporary_buffer Reference
<memory>
function template
<memory>
std::get_temporary_buffertemplate <class T> pair <T*,ptrdiff_t> get_temporary_buffer ( ptrdiff_t n ); template <class T> pair <T*,ptrdiff_t> get_temporary_buffer ( ptrdiff_t n ) noexcept; Get block of temporary memory
The block of storage is aligned apropriately to contain elements of type T if T has a fundamental alignment, although it is left uninitialized (no object is constructed). This function is specifically designed to obtain memory of temporary nature (such as for the operations of an algorithm). Once the memory block is not needed anymore, it shall be released by calling return_temporary_buffer. Notice that the actual size of the buffer returned may be smaller than requested (the actual size is indicated as part of the return value). Parameters
Return valueOn success, the function returns a pair object with its first element containing a pointer to the first element in the block, and the second element its size, in terms of number of elements of type T that it can hold.If the storage cannot be allocated, the pair contains a null pointer as first and a value of zero as second. Example
Possible output:
See also
Home page | Privacy policy
© cplusplus.com, 2000-2026 - All rights reserved - v3.3.4s Spotted an error? contact us | |||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |