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
with the copy of the contents of
other.
c
and
compare
with
other.
compare
.
See
allocator usage note
below.
c
с помощью
std
::
move
(
cont
)
и
compare
с помощью
comp
. Затем сортирует
c
относительно
comp
. Наконец, делает элементы уникальными, т.е. удаляет все, кроме первого элемента из каждой группы последовательных эквивалентных элементов.
c
с помощью
std
::
move
(
cont
)
и
compare
с помощью
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)
эквивалентны соответствующим конструкторам без аллокатора, за исключением того, что
Параметры
Сложность
1)
Константа.
2)
Линейно по размеру
other
.
3)
То же, что и соответствующий move-конструктор обернутого контейнера, т.е. константная или линейная по размеру
cont
.
4-6)
Линейная от
N
если
cont
отсортирован относительно
compare
, иначе
𝓞(N·log(N))
, где
N
является значением
cont.
size
(
)
до этого вызова.
7-9)
То же, что и соответствующий конструктор перемещения обернутого контейнера, т.е. константная или линейная по размеру
cont
.
10-12)
Константа.
13-15)
Линейная от
N
если входной диапазон
[
first
,
last
)
отсортирован относительно
compare
, иначе
𝓞(N·log(N))
, где
N
равно значению
cont.
size
(
)
до этого вызова.
16-19)
Линейная по
N
если входной диапазон
rg
отсортирован относительно
compare
, иначе
𝓞(N·log(N))
, где
N
является значением
cont.
size
(
)
до этого вызова.
20-22)
Линейно по размеру
[
first
,
last
)
.
23-25)
Линейная от
N
если элементы
init
отсортированы относительно
compare
, иначе
𝓞(N·log(N))
, где
N
является значением
cont.
size
(
)
до этого вызова.
26-28)
Линейно по размеру
init
.
Исключения
Вызовы
ПримечанияПосле перемещения контейнера (перегрузка (3,16-19)), ссылки, указатели и итераторы, которые изначально ссылались на элементы в Пример
Смотрите также
| |||||||||||||||||||||||||||||||||||||||||||