Namespaces
Variants

std::allocator<T>:: allocator

From cppreference.net
Memory management library
( exposition only* )
Allocators
Uninitialized memory algorithms
Constrained uninitialized memory algorithms
Memory resources
Uninitialized storage (until C++20)
( until C++20* )
( until C++20* )
( until C++20* )

Garbage collector support (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(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起)

构造默认分配器。由于默认分配器是无状态的,构造函数没有可见效果。

参数

其他 - 用于构造的另一个分配器