Defined in header <scoped_allocator> | ||
---|---|---|
(1) | ||
pointer allocate( size_type n ); | (since C++11) (until C++20) | |
[[nodiscard]] pointer allocate( size_type n ); | (since C++20) | |
(2) | ||
pointer allocate( size_type n, const_void_pointer hint ); | (since C++11) (until C++20) | |
[[nodiscard]] pointer allocate( size_type n, const_void_pointer hint ); | (since C++20) |
Uses the outer allocator to allocate uninitialized storage.
std::allocator_traits<OuterAlloc>::allocate(outer_allocator(), n)
std::allocator_traits<OuterAlloc>::allocate(outer_allocator(), n, hint)
n | - | the number of objects to allocate storage for |
hint | - | pointer to a nearby memory location |
The pointer to the allocated storage.
allocates uninitialized storage (public member function of std::allocator<T> ) |
|
[static] | allocates uninitialized storage using the allocator (public static member function of std::allocator_traits<Alloc> ) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/memory/scoped_allocator_adaptor/allocate