## get_temporary_buffer

    Memory Handling Primitive

- Summary
- Data Type and Member Function Indexes
- Synopsis
- Description
- See Also

### Summary

Pointer based primitive for handling memory

### Data Type and Member Function Indexes
(exclusive of constructors and destructors)

None

### Synopsis

    #include <memory>
    template <class T>
    pair<T*, ptrdiff_t> get_temporary_buffer (ptrdiff_t);
    template <class T>
    pair<T*, ptrdiff_t> get_temporary_buffer (ptrdiff_t, T*);

### Description

The get_temporary_buffer templatized function reserves from system memory the largest possible buffer that is less than or equal to the size requested (`n*sizeof(T)`), and returns a `pair<T*, ptrdiff_t>` containing the address and size of that buffer. The units used to describe the capacity are in `sizeof(T)`.

The first version of this function is not available if your compiler does not support functions templatized on return type only.

### See Also

allocator, pair, return_temporary_buffer.

Copyright (c) 1998, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.
OEM Release, June 1998