pointer allocate(size_type n, const void *hint);
The member function allocates storage for an array of n
elements of type T
, by calling operator new(n)
. It returns a
pointer to the allocated object. The hint
argument helps some allocators in improving locality of reference -- a valid
choice is the address of an object earlier allocated by the same allocator object, and not yet deallocated. To supply no
hint, use a null pointer argument instead.
In this implementation, if a translator does not support member template functions, the template:
template<class U>
pointer allocate(size_type n, const U *hint);
is replaced by:
pointer allocate(size_type n, const void *hint);