Skip to content

Latest commit

 

History

History
53 lines (38 loc) · 1.15 KB

get_allocator.md

File metadata and controls

53 lines (38 loc) · 1.15 KB

get_allocator

  • unordered_map[meta header]
  • std[meta namespace]
  • unordered_multimap[meta class]
  • function[meta id-type]
  • cpp11[meta cpp]
allocator_type get_allocator() const noexcept;

概要

このコンテナで使用されているアロケータオブジェクトを取得する。

戻り値

このコンテナで使用されているアロケータオブジェクト

例外

投げない

#include <unordered_map>

int main()
{
  std::unordered_multimap<char, int> um;

  std::allocator<std::pair<const char, int>> result = um.get_allocator();
}
  • get_allocator()[color ff0000]

出力

バージョン

言語

  • C++11

処理系

  • Clang: 3.0 [mark verified]
  • GCC: 4.3.6 [mark verified]
  • ICC: ??
  • Visual C++: 2010 [mark verified], 2012 [mark verified], 2013 [mark verified], 2015 [mark verified], 2017 [mark verified]
    • 2010は、noexceptが修飾されていない。
    • 2012, 2013は、noexceptが実装されていないため、throw()が修飾されている。