std::scoped_allocator_adaptor::allocate
STD:范围[医]分配器[医]适配器::分配
Defined in header | | |
---|---|---|
pointer allocate( size_type n | (1) | (since C++11) |
pointer allocate( size_type n, const_void_pointer hint | (2) | (since C++11) |
使用外部分配程序分配未初始化的存储。
1%29次电话std::allocator_traits<OuterAlloc>::allocate(outer_allocator(), n)
2%29还通过调用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 |
返回值
指向分配的存储的指针。
另见
allocate | allocates uninitialized storage (public member function of std::allocator) |
---|---|
allocate static | allocates uninitialized storage using the allocator (public static member function of std::allocator_traits) |
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。