std::basic_string<CharT,Traits,Allocator>::get_allocator - cppreference.com

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

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

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

参数

(无)

返回值

关联的分配器。

复杂度

常数。

参阅