std::vector get_allocator() 方法
- 自 C++20 起
- 自 C++11 起
- 直到 C++11
// prism-push-types:allocator_type
// Const version only
constexpr allocator_type get_allocator() const noexcept;
// prism-push-types:allocator_type
// Const version only
allocator_type get_allocator() const noexcept;
// prism-push-types:allocator_type
// Const version only
allocator_type get_allocator() const;
返回与容器关联的分配器。
参数
(无)
返回值
关联的分配器。
复杂度
常数 - O(1)。