allocator_type get_allocator() const noexcept; // (1) C++26
概要
このコンテナで使用されているアロケータオブジェクトを取得する。
戻り値
このコンテナで使用されているアロケータオブジェクト
例外
投げない
例
#include <cassert>
#include <hive>
int main()
{
std::allocator<int> alloc;
std::hive<int> h(alloc);
std::allocator<int> result = h.get_allocator();
assert(result == alloc);
}
出力
バージョン
言語
- C++26
処理系
- Clang: 22 ❌
- GCC: 16.1 ❌
- Visual C++: 2026 Update 2 ❌