std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::allocate
来自cppreference.com
| 在标头 <scoped_allocator> 定义
|
||
| |
(1) | (C++11 起) |
| |
(2) | (C++11 起) |
用外层分配器分配未初始化存储。
1) 调用
std::allocator_traits<OuterAlloc>::allocate(outer_allocator(), n)。2) 附带提供内存位置提示,通过调用
std::allocator_traits<OuterAlloc>::allocate(outer_allocator(), n, hint)。参数
| n | - | 要分配存储的对象数 |
| hint | - | 指向临近内存位置的指针 |
返回值
指向所分配存储的指针。
参阅
| 分配未初始化的存储 ( std::allocator<T> 的公开成员函数)
| |
[静态] |
用分配器分配未初始化的存储 ( std::allocator_traits<Alloc> 的公开静态成员函数)
|