std::unordered_multimap<Key,T,Hash,KeyEqual,Allocator>:: unordered_multimap
| (1) | ||
|
unordered_multimap
(
)
: unordered_multimap ( size_type ( /* 未指定 */ ) ) { } |
(自 C++11 起)
(直至 C++20) |
|
|
unordered_multimap
(
)
;
|
(自 C++20 起) | |
|
explicit
unordered_multimap
(
size_type bucket_count,
const
Hash
&
hash
=
Hash
(
)
,
|
(2) | (自 C++11 起) |
|
unordered_multimap
(
size_type bucket_count,
const
Allocator
&
alloc
)
|
(3) | (自 C++14 起) |
|
unordered_multimap
(
size_type bucket_count,
const
Hash
&
hash,
|
(4) | (自 C++14 起) |
|
explicit
unordered_multimap
(
const
Allocator
&
alloc
)
;
|
(5) | (自 C++11 起) |
|
template
<
class
InputIt
>
unordered_multimap
(
InputIt first, InputIt last,
|
(6) | (自 C++11 起) |
|
template
<
class
InputIt
>
unordered_multimap
(
InputIt first, InputIt last,
|
(7) | (自 C++14 起) |
|
template
<
class
InputIt
>
unordered_multimap
(
InputIt first, InputIt last,
|
(8) | (自 C++14 起) |
|
unordered_multimap
(
const
unordered_multimap
&
other
)
;
|
(9) | (自 C++11 起) |
|
unordered_multimap
(
const
unordered_multimap
&
other,
const
Allocator
&
alloc
)
;
|
(10) | (自 C++11 起) |
|
unordered_multimap
(
unordered_multimap
&&
other
)
;
|
(11) | (自 C++11 起) |
|
unordered_multimap
(
unordered_multimap
&&
other,
const
Allocator
&
alloc
)
;
|
(12) | (自 C++11 起) |
|
unordered_multimap
(
std::
initializer_list
<
value_type
>
init,
size_type bucket_count
=
/* 未指定 */
,
|
(13) | (自 C++11 起) |
|
unordered_multimap
(
std::
initializer_list
<
value_type
>
init,
size_type bucket_count,
|
(14) | (自 C++14 起) |
|
unordered_multimap
(
std::
initializer_list
<
value_type
>
init,
size_type bucket_count,
|
(15) | (自 C++14 起) |
|
template
<
container-compatible-range
<
value_type
>
R
>
unordered_multimap
(
std::
from_range_t
, R
&&
rg,
|
(16) | (自 C++23 起) |
|
template
<
container-compatible-range
<
value_type
>
R
>
unordered_multimap
(
std::
from_range_t
, R
&&
rg,
|
(17) | (自 C++23 起) |
|
template
<
container-compatible-range
<
value_type
>
R
>
unordered_multimap
(
std::
from_range_t
, R
&&
rg,
|
(18) | (自 C++23 起) |
从多种数据源构造新容器。可选择使用用户提供的 bucket_count 作为创建的最小桶数, hash 作为哈希函数, equal 作为键比较函数,以及 alloc 作为分配器。
|
模板参数
|
(C++23 起) |
|
模板参数
|
(C++23 起) |
目录参数
复杂度
1-5)
常量。
9,10)
与
other
的大小成线性关系。
11,12)
常量。如果提供了
alloc
且
alloc
!
=
other.
get_allocator
(
)
,则为线性复杂度。
异常处理
对
注解在容器移动构造(重载 (4))之后,原本指向 虽然在 C++23 之前并未正式要求,但部分实现已在更早的模式下将模板参数
示例
缺陷报告以下行为变更缺陷报告被追溯应用于先前发布的 C++ 标准。
另请参阅
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||