Namespaces
Variants

std::flat_multimap<Key,T,Compare,KeyContainer,MappedContainer>:: flat_multimap

From cppreference.net

(Anmerkung: Der bereitgestellte HTML-Code enthält keinen übersetzbaren Text, da alle Tags leer sind. Bei tatsächlichem Textinhalt würde dieser gemäß den Vorgaben übersetzt werden.)
flat_multimap ( )
: flat_multimap ( key_compare ( ) ) { }
(1) (seit C++23)
template < class Allocator >
flat_multimap ( const flat_multimap & , const Allocator & alloc ) ;
(2) (seit C++23)
template < class Allocator >
flat_multimap ( flat_multimap && , const Allocator & alloc ) ;
(3) (seit C++23)
flat_multimap ( key_container_type key_cont, mapped_container_type mapped_cont,
const key_compare & comp = key_compare ( ) ) ;
(4) (seit C++23)
template < class Allocator >

flat_multimap ( const key_container_type & key_cont,
const mapped_container_type & mapped_cont,

const Allocator & alloc ) ;
(5) (seit C++23)
template < class Allocator >

flat_multimap ( const key_container_type & key_cont,
const mapped_container_type & mapped_cont,

const key_compare & comp, const Allocator & alloc ) ;
(6) (seit C++23)
flat_multimap ( std:: sorted_equivalent_t , key_container_type key_cont,

mapped_container_type mapped_cont,

const key_compare & comp = key_compare ( ) ) ;
(7) (seit C++23)
template < class Allocator >

flat_multimap ( std:: sorted_equivalent_t , const key_container_type & key_cont,

const mapped_container_type & mapped_cont, const Allocator & alloc ) ;
(8) (seit C++23)
template < class Allocator >

flat_multimap ( std:: sorted_equivalent_t , const key_container_type & key_cont,
const mapped_container_type & mapped_cont,

const key_compare & comp, const Allocator & alloc ) ;
(9) (seit C++23)
explicit flat_multimap ( const key_compare & comp )
: c ( ) , compare ( comp ) { }
(10) (seit C++23)
template < class Allocator >
flat_multimap ( const key_compare & comp, const Allocator & alloc ) ;
(11) (seit C++23)
template < class Allocator >
explicit flat_multimap ( const Allocator & alloc ) ;
(12) (seit C++23)
template < class InputIter >

flat_multimap ( InputIter first, InputIter last,
const key_compare & comp = key_compare ( ) )

: c ( ) , compare ( comp ) ;
(13) (seit C++23)
template < class InputIter, class Allocator >

flat_multimap ( InputIter first, InputIter last,

const key_compare & comp, const Allocator & alloc ) ;
(14) (seit C++23)
template < class InputIter, class Allocator >
flat_multimap ( InputIter first, InputIter last, const Allocator & alloc ) ;
(15) (seit C++23)
template < container-compatible-range < value_type > R >

flat_multimap ( std:: from_range_t , R && rg, const key_compare & comp )

: flat_multimap ( comp ) ;
(16) (seit C++23)
template < container-compatible-range < value_type > R >

flat_multimap ( std:: from_range_t fr, R && rg )

: flat_multimap ( fr, std:: forward < R > ( rg ) , key_compare ( ) ) { }
(17) (seit C++23)
template < container-compatible-range < value_type > R, class Allocator >
flat_multimap ( std:: from_range_t , R && rg, const Allocator & alloc ) ;
(18) (seit C++23)
template < container-compatible-range < value_type > R, class Allocator >

flat_multimap ( std:: from_range_t , R && rg, const key_compare & comp,

const Allocator & alloc ) ;
(19) (seit C++23)
template < class InputIter >

flat_multimap ( std:: sorted_equivalent_t s, InputIter first, InputIter last,
const key_compare & comp = key_compare ( ) )

: c ( ) , compare ( comp ) ;
(20) (seit C++23)
template < class InputIter, class Allocator >

flat_multimap ( std:: sorted_equivalent_t s, InputIter first, InputIter last,

const key_compare & comp, const Allocator & alloc ) ;
(21) (seit C++23)
template < class InputIter, class Allocator >

flat_multimap ( std:: sorted_equivalent_t s, InputIter first, InputIter last,

const Allocator & alloc ) ;
(22) (seit C++23)
flat_multimap ( std:: initializer_list < value_type > init,

const key_compare & comp = key_compare ( ) )

: flat_multimap ( init. begin ( ) , init. end ( ) , comp ) { }
(23) (seit C++23)
template < class Allocator >

flat_multimap ( std:: initializer_list < value_type > init, const key_compare & comp,

const Allocator & alloc ) ;
(24) (seit C++23)
template < class Allocator >
flat_multimap ( std:: initializer_list < value_type > init, const Allocator & alloc ) ;
(25) (seit C++23)
flat_multimap ( std:: sorted_equivalent_t s, std:: initializer_list < value_type > init,

const key_compare & comp = key_compare ( ) )

: flat_multimap ( s, init. begin ( ) , init. end ( ) , comp ) { }
(26) (seit C++23)
template < class Allocator >

flat_multimap ( std:: sorted_equivalent_t s, std:: initializer_list < value_type > init,

const key_compare & comp, const Allocator & alloc ) ;
(27) (seit C++23)
template < class Allocator >

flat_multimap ( std:: sorted_equivalent_t s, std:: initializer_list < value_type > init,

const Allocator & alloc ) ;
(28) (seit C++23)

Konstruiert einen neuen Container-Adapter aus verschiedenen Datenquellen und optional unter Verwendung des benutzerdefinierten Vergleichsfunktionsobjekts comp und/oder Allokators alloc .

1) Ein Standardkonstruktor. Konstruiert einen leeren Container-Adapter.
2) Ein copy constructor . Konstruiert c mit der Kopie der Inhalte von other. c und compare mit other. compare . Siehe allocator usage note unten.
3) Ein move constructor . Konstruiert den Container-Adapter mit den Inhalten von other unter Verwendung von Move-Semantik. Siehe allocator usage note unten.
4) Initialisiert zunächst c.keys mit std :: move ( key_cont ) , c.values mit std :: move ( mapped_cont ) und compare mit comp . Sortiert anschließend den zugrundeliegenden Bereich [ begin ( ) , end ( ) ) bezüglich value_comp() .
5) Gleich wie (4) , entspricht flat_multimap ( key_cont, mapped_cont ) ; . Siehe Allokator-Verwendungshinweis unten.
6) Gleich wie (4) , entspricht flat_multimap ( key_cont, mapped_cont, comp ) ; . Siehe allocator usage note unten.
7) Initialisiert c.keys mit std :: move ( key_cont ) , c.values mit std :: move ( mapped_cont ) , und compare mit comp .
8) Gleich wie (7) , äquivalent zu flat_multimap ( s, key_cont, mapped_cont ) ; . Siehe Allokator-Verwendungshinweis unten.
9) Gleich wie (7) , entspricht flat_multimap ( s, key_cont, mapped_cont, comp ) ; . Siehe Allokator-Verwendungshinweis unten.
10) Konstruiert einen leeren Container-Adapter.
11,12) Konstruiert einen leeren Container-Adapter. Siehe allocator usage note unten.
13) Konstruiert den Container-Adapter mit den Inhalten des Bereichs [ first , last ) , äquivalent zu insert ( first, last ) ; .
14,15) Gleich wie (13) . Siehe Allokator-Verwendungshinweis unten.
16) Konstruiert den Container-Adapter mit den Inhalten des Bereichs rg . Zuerst wird (10) als Delegating Constructor verwendet. Dann initialisiert c mit den Inhalten von rg als ob durch insert_range ( std:: forward < R > ( rg ) ) ; .
17) Gleich wie (16) , verwendet als delegating constructor .
18,19) Gleich wie (16) . Siehe allocator usage note unten.
20) Konstruiert die zugrundeliegenden Container mit den Inhalten des Bereichs [ first , last ) als ob durch insert ( first, last ) .
21,22) Gleich wie (20) . Siehe allocator usage note unten.
23) Ein initializer-list constructor . Konstruiert den zugrundeliegenden Container mit den Inhalten der Initialisierungsliste init , wobei (13) als delegating constructor verwendet wird.
24,25) Gleich wie (23) . Siehe Allokator-Verwendungshinweis unten.
26) Ein Initializer-List-Konstruktor . Konstruiert den zugrundeliegenden Container mit den Inhalten der Initialisierungsliste init , wobei (20) als Delegating-Konstruktor verwendet wird.
27,28) Speichern als (26) . Siehe Allokator-Verwendungshinweis unten.

Hinweis für Überladungen (13-15,20-22) : Wenn [ first , last ) kein gültiger Bereich ist, ist das Verhalten undefiniert.

Inhaltsverzeichnis

Hinweise zur Allocator-Verwendung

Die Konstruktoren (2,3,5,6,8,9,11,12,14,15,17,19,21,22,24,25,27,28) entsprechen den entsprechenden Nicht-Allokator-Konstruktoren, mit der Ausnahme, dass die zugrundeliegenden Container c.keys und c.values mittels Uses-Allocator-Konstruktion erstellt werden. Diese Überladungen nehmen nur dann an der Überladungsauflösung teil, wenn std:: uses_allocator_v < container_type, Allocator > true ist.

Parameter

key_cont - ein Container, der als Quelle zur Initialisierung des zugrundeliegenden Schlüssel-Containers verwendet werden soll
mapped_cont - ein Container, der als Quelle zur Initialisierung des zugrundeliegenden Werte-Containers verwendet werden soll
other - ein weiterer flat_multimap , der als Quelle zur Initialisierung der Elemente der zugrundeliegenden Container verwendet werden soll
alloc - ein Allokator, der für alle Speicherallokationen der zugrundeliegenden Container verwendet werden soll
comp - ein Funktionsobjekt, das für alle Schlüsselvergleiche verwendet werden soll
first, last - das Iteratorpaar, das den Quell- Bereich der zu kopierenden Elemente definiert
init - eine Initialisierungsliste zur Initialisierung der Elemente der zugrundeliegenden Container
rg - ein container-kompatibler Bereich (d.h. ein input_range , dessen Elemente in value_type konvertierbar sind) zur Initialisierung der zugrundeliegenden Container
fr - ein Unterscheidungs-Tag , das anzeigt, dass das enthaltene Element Bereichs-konstruiert werden soll
s - ein Unterscheidungs-Tag , das anzeigt, dass die Eingabesequenz bezüglich value_comp() sortiert ist
Typanforderungen
-
InputIt muss die Anforderungen von LegacyInputIterator erfüllen.
-
Compare muss die Anforderungen von Compare erfüllen.
-
Allocator muss die Anforderungen von Allocator erfüllen.

Komplexität

1) Konstante.
2) Linear in der Größe von other .
3) Gleich wie der entsprechende Move-Konstruktor des umschlossenen Containers, d.h. konstant oder linear in der Größe von cont .
4-6) Linear in N if cont is sorted with respect to value_comp() , otherwise 𝓞(N·log(N)) , where N is the value of key_cont. size ( ) before this call.
7-9) Gleich wie der entsprechende Move-Konstruktor des umschlossenen Containers, d.h. konstant oder linear in der Größe von cont .
10-12) Konstante.
13-15) Linear in N if the input range [ first , last ) is sorted with respect to value_comp() , otherwise 𝓞(N·log(N)) , where N is the value of key_cont. size ( ) before this call.
16-19) Linear in N if the input range rg is sorted with respect to value_comp() , otherwise 𝓞(N·log(N)) , where N is the value of key_cont. size ( ) before this call.
20-22) Linear in der Größe von [ first , last ) .
23-25) Linear in N if the elements of init are sorted with respect to value_comp() , otherwise 𝓞(N·log(N)) , where N is the value of key_cont. size ( ) before this call.
26-28) Linear in der Größe von init .

Ausnahmen

Aufrufe von Allocator::allocate können eine Ausnahme auslösen.

Hinweise

Nach Container-Move-Konstruktion (Überladung ( 3 ) ) bleiben Referenzen, Zeiger und Iteratoren (außer dem End-Iterator) zu other gültig, verweisen jedoch auf Elemente, die sich nun in * this befinden. Der aktuelle Standard gibt diese Garantie durch die pauschale Aussage in [container.reqmts]/67 , und eine direktere Garantie wird via LWG issue 2321 geprüft.

Beispiel

Siehe auch

weist Werte dem Container-Adapter zu
(öffentliche Elementfunktion)