◐ Shell
clean mode source ↗

std::allocator<T>::allocator - cppreference.com

来自cppreference.com

allocator() throw();
(1) (C++11 前)
allocator() noexcept;
(C++11 起)
(C++20 前)
constexpr allocator() noexcept;
(C++20 起)
allocator( const allocator& other ) throw();
(2) (C++11 前)
allocator( const allocator& other ) noexcept;
(C++11 起)
(C++20 前)
constexpr allocator( const allocator& other ) noexcept;
(C++20 起)
template< class U >
allocator( const allocator<U>& other ) throw();
(3) (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 起)

构造默认分配器。因为默认分配器是无状态的,故构造函数无可见效应。

参数

other - 用以构造的另一 allocator