std::flat_set<Key,Compare,KeyContainer>:: flat_set
|
flat_set
(
)
: flat_set ( key_compare ( ) ) { } |
(1) | (C++23 이후) |
|
template
<
class
Allocator
>
flat_set ( const flat_set & other, const Allocator & alloc ) ; |
(2) | (C++23부터) |
|
template
<
class
Allocator
>
flat_set ( flat_set && other, const Allocator & alloc ) ; |
(3) | (C++23 이후) |
|
explicit
flat_set
(
container_type cont,
const key_compare & comp = key_compare ( ) ) ; |
(4) | (C++23부터) |
|
template
<
class
Allocator
>
flat_set ( const container_type & cont, const Allocator & alloc ) ; |
(5) | (C++23 이후) |
|
template
<
class
Allocator
>
flat_set
(
const
container_type
&
cont,
const
key_compare
&
comp,
|
(6) | (C++23 이후) |
|
flat_set
(
std::
sorted_unique_t
s, container_type cont,
const
key_compare
&
comp
=
key_compare
(
)
)
|
(7) | (C++23 이후) |
|
template
<
class
Allocator
>
flat_set
(
std::
sorted_unique_t
s,
const
container_type
&
cont,
|
(8) | (C++23 이후) |
|
template
<
class
Allocator
>
flat_set
(
std::
sorted_unique_t
s,
const
container_type
&
cont,
|
(9) | (C++23 이후) |
|
explicit
flat_set
(
const
key_compare
&
comp
)
: c ( ) , compare ( comp ) { } |
(10) | (C++23 이후) |
|
template
<
class
Allocator
>
flat_set ( const key_compare & comp, const Allocator & alloc ) ; |
(11) | (C++23 이후) |
|
template
<
class
Allocator
>
explicit flat_set ( const Allocator & alloc ) ; |
(12) | (C++23 이후) |
|
template
<
class
InputIter
>
flat_set
(
InputIter first, InputIter last,
|
(13) | (C++23 이후) |
|
template
<
class
InputIter,
class
Allocator
>
flat_set
(
InputIter first, InputIter last,
|
(14) | (C++23 이후) |
|
template
<
class
InputIter,
class
Allocator
>
flat_set ( InputIter first, InputIter last, const Allocator & alloc ) ; |
(15) | (C++23 이후) |
|
template
<
container-compatible-range
<
value_type
>
R
>
flat_set
(
std::
from_range_t
, R
&&
rg,
const
key_compare
&
comp
)
|
(16) | (C++23 이후) |
|
template
<
container-compatible-range
<
value_type
>
R
>
flat_set
(
std::
from_range_t
fr, R
&&
rg
)
|
(17) | (C++23 이후) |
|
template
<
container-compatible-range
<
value_type
>
R,
class
Allocator
>
flat_set ( std:: from_range_t , R && rg, const Allocator & alloc ) ; |
(18) | (C++23 이후) |
|
template
<
container-compatible-range
<
value_type
>
R,
class
Allocator
>
flat_set
(
std::
from_range_t
, R
&&
rg,
const
key_compare
&
comp,
|
(19) | (C++23 이후) |
|
template
<
class
InputIter
>
flat_set
(
std::
sorted_unique_t
s, InputIter first, InputIter last,
|
(20) | (C++23 이후) |
|
template
<
class
InputIter,
class
Allocator
>
flat_set
(
std::
sorted_unique_t
s, InputIter first, InputIter last,
|
(21) | (C++23 이후) |
|
template
<
class
InputIter,
class
Allocator
>
flat_set
(
std::
sorted_unique_t
s, InputIter first, InputIter last,
|
(22) | (C++23 이후) |
|
flat_set
(
std::
initializer_list
<
value_type
>
init,
const
key_compare
&
comp
=
key_compare
(
)
)
|
(23) | (C++23부터) |
|
template
<
class
Allocator
>
flat_set
(
std::
initializer_list
<
value_type
>
init,
const
key_compare
&
comp,
|
(24) | (C++23부터) |
|
template
<
class
Allocator
>
flat_set ( std:: initializer_list < value_type > init, const Allocator & alloc ) ; |
(25) | (C++23 이후) |
|
flat_set
(
std::
sorted_unique_t
s,
std::
initializer_list
<
value_type
>
init,
const
key_compare
&
comp
=
key_compare
(
)
)
|
(26) | (C++23 이후) |
|
template
<
class
Allocator
>
flat_set
(
std::
sorted_unique_t
s,
std::
initializer_list
<
value_type
>
init,
|
(27) | (C++23 이후) |
|
template
<
class
Allocator
>
flat_set
(
std::
sorted_unique_t
s,
std::
initializer_list
<
value_type
>
init,
|
(28) | (C++23부터) |
다양한 데이터 소스와 선택적으로 제공된 비교 함수 객체 comp 및/또는 할당자 alloc 로부터 새로운 컨테이너 어댑터를 생성합니다.
c
를
other.
c
의 내용 사본으로 구성하고,
compare
를
other.
compare
로 구성합니다.
아래의
allocator usage note
를 참조하십시오.
c
를
std
::
move
(
cont
)
로,
compare
를
comp
로 초기화합니다. 그런 다음
c
를
comp
를 기준으로 정렬합니다. 마지막으로 요소들을 고유하게 만들며, 즉 연속된 동등한 요소 그룹에서 첫 번째 요소를 제외한 모든 요소를 제거합니다.
[
first
,
last
)
의 내용으로 생성합니다.
insert
(
first, last
)
;
와 동일합니다.
c
를
rg
의 내용으로 초기화합니다. 마치
insert_range
(
std::
forward
<
R
>
(
rg
)
)
;
와 같이 수행됩니다.
[
first
,
last
)
의 내용으로 기반 컨테이너를 구성합니다.
c
를
c
(
first, last
)
로 초기화하고
compare
를
compare
(
comp
)
로 초기화합니다.
오버로드 참고 사항
(13-15,20-22)
: 만약
[
first
,
last
)
가
유효한 범위
가 아닌 경우, 동작은 정의되지 않습니다.
Note for overloads (4-6,13-19,23-25) : If multiple elements in the range have keys that compare equivalent, it is unspecified which element is inserted (pending LWG2844 ).
목차 |
할당자 사용 참고 사항
생성자들
(2,3,5,6,8,9,11,12,14,15,17,19,21,22,24,25,27,28)
은 해당하는 비-할당자 생성자들과 동일하지만,
c
가
사용-할당자 생성
으로 구성된다는 점이 다릅니다.
이러한 오버로드들은
std::
uses_allocator_v
<
container_type, Allocator
>
가
true
인 경우에만 오버로드 해결에 참여합니다.
매개변수
| cont | - | 기본 컨테이너를 초기화하는 데 사용할 소스 컨테이너 |
| other | - |
기본 컨테이너의 요소를 초기화하는 데 사용할 다른
flat_set
|
| alloc | - | 기본 컨테이너의 모든 메모리 할당에 사용할 할당자 |
| comp | - | 키 비교에 사용할 함수 객체 |
| first, last | - | 복사할 요소의 소스 범위 를 정의하는 반복자 쌍 |
| init | - | 기본 컨테이너의 요소를 초기화하는 데 사용할 초기화 리스트 |
| rg | - |
기본 컨테이너를 초기화하는 데 사용할 소스
컨테이너 호환 범위
(즉, 요소가
value_type
으로 변환 가능한
input_range
)
|
| fr | - | 포함된 멤버가 범위 생성되어야 함을 나타내는 구분 태그 |
| s | - |
입력 시퀀스가
compare
에 대해 정렬되고 모든 요소가 고유함을 나타내는
구분 태그
|
| 타입 요구사항 | ||
-
InputIt
는
LegacyInputIterator
요구사항을 충족해야 합니다.
|
||
-
Compare
는
Compare
요구사항을 충족해야 합니다.
|
||
-
Allocator
는
Allocator
요구사항을 충족해야 합니다.
|
||
복잡도
[
first
,
last
)
가
compare
에 대해 정렬된 경우
N
에 대해 선형, 그렇지 않으면
𝓞(N·log(N))
입니다. 여기서
N
은 이 호출 전
cont.
size
(
)
의 값입니다.
[
first
,
last
)
의 크기에 선형적입니다.
예외
Allocator::allocate
에 대한 호출은 예외를 발생시킬 수 있습니다.
참고 사항
컨테이너 이동 생성 후 (오버로드 ( 3 ) ), other 에 대한 참조, 포인터, 및 반복자(끝 반복자 제외)는 유효하지만, 이제는 * this 에 있는 요소들을 참조합니다. 현재 표준은 [container.reqmts]/67 의 포괄적 명시를 통해 이 보장을 제공하며, LWG 이슈 2321 을 통해 더 직접적인 보장이 검토 중입니다.
예제
|
이 섹션은 불완전합니다
이유: 예시가 없음 |
참고 항목
|
컨테이너 어댑터에 값을 할당합니다
(public member function) |