template < class Key, // unordered_map::key_type class T, // unordered_map::mapped_type class Hash = hash<Key>, // unordered_map::hasher class Pred = equal_to<Key>, // unordered_map::key_equal class Alloc = allocator< pair<const Key,T> > // unordered_map::allocator_type > class unordered_map;
|
|
|
|
|
|
成員型別 | 定義 | 說明 |
---|---|---|
key_type | 第一個模板引數 (鍵) | |
mapped_type | 第二個模板引數 (T) | |
value_type | pair<const key_type,mapped_type> | |
hasher | 第三個模板引數 (Hash) | 預設為hash<key_type> |
key_equal | 第四個模板引數 (Pred) | 預設為equal_to<key_type> |
allocator_type | 第五個模板引數 (Alloc) | 預設為allocator<value_type> |
引用 | Alloc::reference | |
const_reference | Alloc::const_reference | |
指標 | Alloc::pointer | 對於預設的 allocatorvalue_type* |
const_pointer | Alloc::const_pointer | 對於預設的 allocatorconst value_type* |
iterator | 一個指向value_type | |
const_iterator | 一個指向const value_type | |
local_iterator | 一個指向value_type | |
const_local_iterator | 一個指向const value_type | |
size_type | 一個無符號整數型別 | 的無符號整數型別,通常與 size_t 一樣 |
difference_type | 一個有符號整數型別 | 相同,通常與 ptrdiff_t 一樣 |
成員型別 | 定義 | 說明 |
---|---|---|
key_type | 第一個模板引數 (鍵) | |
mapped_type | 第二個模板引數 (T) | |
value_type | pair<const key_type,mapped_type> | |
hasher | 第三個模板引數 (Hash) | 預設為hash<key_type> |
key_equal | 第四個模板引數 (Pred) | 預設為equal_to<key_type> |
allocator_type | 第五個模板引數 (Alloc) | 預設為allocator<value_type> |
引用 | value_type& | |
const_reference | const value_type& | |
指標 | allocator_traits<Alloc>::pointer | 對於預設的 allocatorvalue_type* |
const_pointer | allocator_traits<Alloc>::const_pointer | 對於預設的 allocatorconst value_type* |
iterator | 一個指向value_type | |
const_iterator | 一個指向const value_type | |
local_iterator | 一個指向value_type | |
const_local_iterator | 一個指向const value_type | |
size_type | 一個無符號整數型別 | 的無符號整數型別,通常與 size_t 一樣 |
difference_type | 一個有符號整數型別 | 相同,通常與 ptrdiff_t 一樣 |