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

Returns the allocator associated with the string.

# Declarations

allocator_type get_allocator() const;

(noexcept since C++20) (constexpr since C++20)

# Return value

The associated allocator.

# See also