C++ 字串庫 - get_allocator



描述

它返回與字串關聯的分配器物件的副本。

宣告

以下是 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;

引數

返回值

它返回與字串關聯的分配器物件的副本。

異常

如果丟擲異常,字串不會發生任何更改。

string.htm
廣告