unordered_set::allocator_type
更新 : 2007 年 11 月
ストレージを管理するためのアロケータの型です。
typedef Alloc allocator_type;
解説
この型は、テンプレート パラメータ Alloc のシノニムです。
使用例
// std_tr1__unordered_set__unordered_set_allocator_type.cpp
// compile with: /EHsc
#include <unordered_set>
#include <iostream>
typedef std::tr1::unordered_set<char> Myset;
typedef std::allocator<std::pair<const char, int> > Myalloc;
int main()
{
Myset c1;
Myset::allocator_type al = c1.get_allocator();
std::cout << "al == std::allocator() is "
<< std::boolalpha << (al == Myalloc()) << std::endl;
return (0);
}
al == std::allocator() is true
必要条件
ヘッダー : <unordered_set>
名前空間 : std::tr1