Allocates a temporary buffer.
- Parameters:
-
| len | The number of objects of type Tp. |
- Returns:
- See full description.
Reinventing the wheel, but this time with prettier spokes!
This function tries to obtain storage for len adjacent Tp objects. The objects themselves are not constructed, of course. A pair<> is returned containing "the buffer s address and capacity (in the units of sizeof(Tp)), or a pair of 0 values if no storage can be obtained." Note that the capacity obtained may be less than that requested if the memory is unavailable; you should compare len with the .second return value.
Provides the nothrow exception guarantee.
Definition at line 110 of file memory. |