C++ String Library - get_allocator
Description
It returns a copy of the allocator object associated with the string.
Declaration
Following is the declaration for std::string::get_allocator.
allocator_type get_allocator() const;
C++11
allocator_type get_allocator() const noexcept;
C++14
allocator_type get_allocator() const noexcept;
Parameters
none
Return Value
It returns a copy of the allocator object associated with the string.
Exceptions
if an exception is thrown, there are no changes in the string.
string.htm
Advertisements