std::allocator<T>::allocator
自 C++20 起
// 1)
constexpr allocator() noexcept;
// 2)
constexpr allocator( const allocator& other ) noexcept;
// 3)
template< class U >
constexpr allocator( const allocator<U>& other ) noexcept;
从 C++11 起,直到 C++20
// 1)
allocator() noexcept;
// 2)
allocator( const allocator& other ) noexcept;
// 3)
template< class U >
allocator( const allocator<U>& other ) noexcept;
直到 C++11
// 1)
allocator() throw();
// 2)
allocator( const allocator& other ) throw();
// 3)
template< class U >
allocator( const allocator<U>& other ) throw();
构造默认分配器。由于默认分配器是无状态的,因此构造函数没有可见的效果。
参数
other
- 要构造的另一个分配器