Namespaces
Variants

std::basic_string<CharT,Traits,Allocator>:: get_allocator

From cppreference.net
std::basic_string
allocator_type get_allocator ( ) const ;
(自 C++20 起为 noexcept)
(自 C++20 起为 constexpr)

返回与字符串关联的分配器。

目录

参数

(无)

返回值

关联的分配器。

复杂度

常量。

参见

默认分配器
(类模板)
提供分配器类型的信息
(类模板)
检查指定类型是否支持使用分配器构造
(类模板)