std::allocator<T>:: allocator
From cppreference.net
C++
Memory management library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::allocator
| Member functions | ||||
|
allocator::allocator
|
||||
|
(until C++20)
|
||||
|
(C++23)
|
||||
|
(until C++20)
|
||||
|
(until C++20)
|
||||
|
(until C++20)
|
||||
| Non-member functions | ||||
|
(until C++20)
|
| (1) | ||
|
allocator
(
)
throw
(
)
;
|
(C++11前) | |
|
allocator
(
)
noexcept
;
|
(C++11起)
(C++20前) |
|
|
constexpr
allocator
(
)
noexcept
;
|
(C++20起) | |
| (2) | ||
|
allocator
(
const
allocator
&
other
)
throw
(
)
;
|
(C++11前) | |
|
allocator
(
const
allocator
&
other
)
noexcept
;
|
(C++11起)
(C++20前) |
|
|
constexpr
allocator
(
const
allocator
&
other
)
noexcept
;
|
(C++20起) | |
| (3) | ||
|
template
<
class
U
>
allocator ( const allocator < U > & other ) throw ( ) ; |
(C++11前) | |
|
template
<
class
U
>
allocator ( const allocator < U > & other ) noexcept ; |
(C++11起)
(C++20前) |
|
|
template
<
class
U
>
constexpr allocator ( const allocator < U > & other ) noexcept ; |
(C++20起) | |
构造默认分配器。由于默认分配器是无状态的,构造函数没有可见效果。
参数
| 其他 | - | 用于构造的另一个分配器 |