std::unordered_set<Key,Hash,KeyEqual,Allocator>:: unordered_set
| (1) | ||
|
unordered_set
(
)
: unordered_set ( size_type ( /* unspecified */ ) ) { } |
(C++11부터)
(C++20까지) |
|
|
unordered_set
(
)
;
|
(C++20부터) | |
|
explicit
unordered_set
(
size_type bucket_count,
const
Hash
&
hash
=
Hash
(
)
,
|
(2) | (C++11 이후) |
|
unordered_set
(
size_type bucket_count,
const
Allocator
&
alloc
)
|
(3) | (C++14 이후) |
|
unordered_set
(
size_type bucket_count,
const
Hash
&
hash,
|
(4) | (C++14 이후) |
|
explicit
unordered_set
(
const
Allocator
&
alloc
)
;
|
(5) | (C++11 이후) |
|
template
<
class
InputIt
>
unordered_set
(
InputIt first, InputIt last,
|
(6) | (C++11 이후) |
|
template
<
class
InputIt
>
unordered_set
(
InputIt first, InputIt last,
|
(7) | (C++14 이후) |
|
template
<
class
InputIt
>
unordered_set
(
InputIt first, InputIt last,
|
(8) | (C++14부터) |
|
unordered_set
(
const
unordered_set
&
other
)
;
|
(9) | (C++11 이후) |
|
unordered_set
(
const
unordered_set
&
other,
const
Allocator
&
alloc
)
;
|
(10) | (C++11 이후) |
|
unordered_set
(
unordered_set
&&
other
)
;
|
(11) | (C++11 이후) |
|
unordered_set
(
unordered_set
&&
other,
const
Allocator
&
alloc
)
;
|
(12) | (C++11 이후) |
|
unordered_set
(
std::
initializer_list
<
value_type
>
init,
size_type bucket_count
=
/* 지정되지 않음 */
,
|
(13) | (C++11 이후) |
|
unordered_set
(
std::
initializer_list
<
value_type
>
init,
size_type bucket_count,
|
(14) | (C++14부터) |
|
unordered_set
(
std::
initializer_list
<
value_type
>
init,
size_type bucket_count,
|
(15) | (C++14부터) |
|
template
<
container-compatible-range
<
value_type
>
R
>
unordered_set
(
std::
from_range_t
, R
&&
rg,
|
(16) | (C++23 이후) |
|
template
<
container-compatible-range
<
value_type
>
R
>
unordered_set
(
std::
from_range_t
, R
&&
rg,
|
(17) | (C++23부터) |
|
template
<
container-compatible-range
<
value_type
>
R
>
unordered_set
(
std::
from_range_t
, R
&&
rg,
|
(18) | (C++23 이후) |
다양한 데이터 소스로부터 새로운 컨테이너를 생성합니다. 선택적으로 사용자가 제공한 bucket_count 를 생성할 최소 버킷 수로 사용하고, hash 를 해시 함수로, equal 를 키 비교 함수로, alloc 를 할당자로 사용합니다.
[
first
,
last
)
의 내용으로 컨테이너를 생성합니다.
max_load_factor()
를
1.0
으로 설정합니다. 범위 내에 동등한 키를 가진 여러 요소가 있는 경우, 어떤 요소가 삽입될지 명시되지 않습니다 (보류 중인
LWG2844
).
|
템플릿 매개변수
|
(C++23 이후) |
|
템플릿 매개변수
|
(C++23부터) |
내용매개변수
복잡도
1-5)
상수.
9,10)
other
의 크기에 선형적입니다.
11,12)
상수. 만약
alloc
이 주어지고
alloc
!
=
other.
get_allocator
(
)
라면, 선형입니다.
예외
참고 사항컨테이너 이동 생성(오버로드 (4)) 후, 원래 C++23까지 공식적으로 요구되지는 않지만, 일부 구현에서는 이미 이전 모드에서 템플릿 매개변수
예제
결함 보고서다음의 동작 변경 결함 보고서들은 이전에 발표된 C++ 표준에 소급 적용되었습니다.
참고 항목
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||