allocator_type get_allocator() const;
概要
格納されているアロケータ(元のコンテナのアロケータ)のコピーを返す。
要件
empty() == false
戻り値
*alloc_
例外
投げない。
例
#include <iostream>
#include <set>
int main()
{
std::set s = { 1, 2, 3 };
auto nh = s.extract(s.begin());
[[maybe_unused]] auto alloc = nh.get_allocator();
}
出力
0
バージョン
言語
- C++17
処理系
- Clang: 7.0.0
- GCC: 7.1.0
- ICC: ??
- Visual C++: 2017 Update 5