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 (注:元のテキスト「LWG2844」はC++固有の用語(LWG = Library Working Group)であり、翻訳対象外のため変更していません) ).
目次アロケータ使用上の注意
コンストラクタ
(2,3,5,6,8,9,11,12,14,15,17,19,21,22,24,25,27,28)
は、対応する非アロケータコンストラクタと同等ですが、
パラメータ
計算量
1)
定数。
2)
サイズは
other
に対して線形。
3)
ラップされたコンテナの対応するムーブコンストラクタと同じ、すなわち
cont
のサイズに対して定数時間または線形時間。
4-6)
N
に対して線形(
cont
が
compare
に関してソートされている場合)、それ以外の場合は
𝓞(N·log(N))
。ここで
N
はこの呼び出し前の
cont.
size
(
)
の値。
7-9)
ラップされたコンテナの対応するムーブコンストラクタと同じ、すなわち
cont
のサイズに対して定数時間または線形時間。
10-12)
定数。
13-15)
入力範囲
[
first
,
last
)
が
compare
に関してソートされている場合は
N
に対して線形、それ以外の場合は
𝓞(N·log(N))
。ここで
N
はこの呼び出し前の
cont.
size
(
)
の値。
16-19)
入力範囲
rg
が
compare
に関してソートされている場合は
N
に対して線形、それ以外の場合は
𝓞(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))、元々 例
関連項目
| |||||||||||||||||||||||||||||||||||||||||||