The storage is aligned appropriately for objects of type T, but they are not constructed.
In the default allocator, the block of storage is allocated using ::operator new one or more times, and throws bad_alloc if it cannot allocate the total amount of storage requested.
Parameters
- n
- Number of elements (each of size sizeof(T)) to be allocated.
In allocator, the member type size_type is an alias of size_t, which is an unsigned integral type. - hint
- Either 0 or a value previously obtained by another call to allocate and not yet freed with deallocate.
When it is not 0, this value may be used as a hint to improve performance by allocating the new block near the one specified.
[/dd]
Return value
A pointer to the initial element in the block of storage.allocator throws bad_alloc if it cannot allocate the requested amount of storage.
In allocator, member type pointer is an alias of T*.[/dd]
See also
| allocator::deallocate | Release block of storage (public member function) |
