allocator_traits::allocate 메서드
Static method that allocates memory by using the given allocator parameter.
static pointer allocate(Alloc& al, size_type count);
static pointer allocate(Alloc& al, size_type count,
typename allocator_traits<void>::const_pointer *hint);
매개 변수
al
An allocator object.count
The number of elements to allocate.hint
A const_pointer that might assist the allocator object in satisfying the request for storage by locating the address of an allocated object prior to the request. A null pointer is treated as no hint.
반환 값
Each method returns a pointer to the allocated object.
The first static method returns al.allocate(count).
The second method returns al.allocate(count, hint), if that expression is well formed; otherwise it returns al.allocate(count).
요구 사항
헤더 <memory>
네임스페이스: std