allocator_type get_allocator() const noexcept;
概要
このコンテナで使用されているアロケータオブジェクトを取得する。
戻り値
このコンテナで使用されているアロケータオブジェクト
例外
投げない
例
#include <unordered_map>
int main()
{
std::unordered_map<char, int> um;
std::allocator<std::pair<const char, int>> result = um.get_allocator();
}
出力
バージョン
言語
- C++11
処理系
- Clang: 3.0
- GCC: 4.3.6
- ICC: ??
- Visual C++: 2010, 2012, 2013, 2015, 2017
- 2010は、
noexcept
が修飾されていない。 - 2012, 2013は、
noexcept
が実装されていないため、throw()
が修飾されている。
- 2010は、