Namespaces
Variants

std::priority_queue<T,Container,Compare>:: operator=

From cppreference.net

priority_queue & operator = ( const priority_queue & other ) ;
(1) (implizit deklariert)
priority_queue & operator = ( priority_queue && other ) ;
(2) (seit C++11)
(implizit deklariert)

Ersetzt den Inhalt des Container-Adapters durch den Inhalt des gegebenen Arguments.

1) Kopierzuweisungsoperator. Ersetzt den Inhalt durch eine Kopie des Inhalts von other . Ruft effektiv c = other. c ; comp = other. comp ; auf.
2) Move-Zuweisungsoperator. Ersetzt die Inhalte durch die von other unter Verwendung von Move-Semantik. Ruft effektiv c = std :: move ( other. c ) ; comp = std :: move ( other. comp ) ; auf.

Inhaltsverzeichnis

Parameter

other - ein weiterer Container-Adapter, der als Quelle verwendet werden soll

Rückgabewert

* this

Komplexität

1,2) Entspricht dem operator = des zugrundeliegenden Containers.

Beispiel

Siehe auch

konstruiert die priority_queue
(öffentliche Elementfunktion)