最終更新日時:
が更新

履歴 編集

function
<hive>

std::hive::get_allocator(C++26)

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

処理系

参照