std::unordered_multimap<Key,T,Hash,KeyEqual,Allocator>::unordered_multimap
|   unordered_multimap() : unordered_multimap( size_type(/*implementation-defined*/) ) {} explicit unordered_multimap( size_type bucket_count,  | 
(1) | (C++11 起) | 
|   unordered_multimap( size_type bucket_count,                     const Allocator& alloc )  | 
(1) | (C++14 起) | 
|   explicit unordered_multimap( const Allocator& alloc );  | 
(1) | (C++11 起) | 
|   template< class InputIt > unordered_multimap( InputIt first, InputIt last,  | 
(2) | (C++11 起) | 
|   template< class InputIt > unordered_multimap( InputIt first, InputIt last,  | 
(2) | (C++14 起) | 
|   template< class InputIt > unordered_multimap( InputIt first, InputIt last,  | 
(2) | (C++14 起) | 
|   unordered_multimap( const unordered_multimap& other );  | 
(3) | (C++11 起) | 
|   unordered_multimap( const unordered_multimap& other, const Allocator& alloc );  | 
(3) | (C++11 起) | 
|   unordered_multimap( unordered_multimap&& other );  | 
(4) | (C++11 起) | 
|   unordered_multimap( unordered_multimap&& other, const Allocator& alloc );  | 
(4) | (C++11 起) | 
|   unordered_multimap( std::initializer_list<value_type> init,                     size_type bucket_count = /*implementation-defined*/,  | 
(5) | (C++11 起) | 
|   unordered_multimap( std::initializer_list<value_type> init,                     size_type bucket_count,  | 
(5) | (C++14 起) | 
|   unordered_multimap( std::initializer_list<value_type> init,                     size_type bucket_count,  | 
(5) | (C++14 起) | 
从各种数据源构造新容器。可选的以用户提供的 bucket_count 为用于创建的最小桶数,以 hash 为哈希函数,以 equal 为比较关键的函数,和以 alloc 为分配器。
max_load_factor() 为 1.0 。对于默认构造函数,桶数是实现定义的。[first, last) 的内容的容器。设置 max_load_factor() 为 1.0 。other 内容副本的容器,一同复制加载因子、谓词和哈希函数。若不提供 alloc ,则通过调用 std::allocator_traits<allocator_type>::select_on_container_copy_construction(other.get_allocator()) 获得分配器。other 内容的容器。若不提供 alloc ,则通过从属于 other 的分配器移动构造获得分配器。init 内容的容器,同 unordered_multimap(init.begin(), init.end()) 。参数
| alloc | - | 用于此容器所有内存分配器的分配器 | 
| bucket_count | - | 初始化时用的最小桶数。若不指定,则使用实现定义的默认值 | 
| hash | - | 要用的哈希函数 | 
| equal | - | 用于此容器所有关键比较的比较函数 | 
| first, last | - | 复制元素来源的范围 | 
| other | - | 用作源以初始化容器元素的另一容器 | 
| init | - | 用以初始化容器元素的 initializer_list | 
| 类型要求 | ||
 -InputIt 必须满足遗留输入迭代器 (LegacyInputIterator)  的要求。
 | ||
复杂度
first 和 last 间的距离成线性,最坏情况成平方。other 的大小成线性。alloc 且 alloc != other.get_allocator() 则为线性。init 的大小成线性,最坏情况成平方。异常
对 Allocator::allocate 的调用可能抛出。
注意
other 的引用及迭代器(除了尾迭代器)保持合法,但指代现于 *this 中的元素。当前标准由 [container.requirements.general]/12 中的总括陈述作出此保证,而 LWG 2321 正在考虑更严格的保证。
示例
| 本节未完成 原因:暂无示例  | 
缺陷报告
下列更改行为的缺陷报告追溯地应用于以前出版的 C++ 标准。
| DR | 应用于 | 出版时的行为 | 正确行为 | 
|---|---|---|---|
| LWG 2193 | C++11 | 默认构造函数为 explicit | 使之为非 explicit | 
参阅
|    赋值给容器   (公开成员函数)  |