◐ Shell
clean mode source ↗

std::priority_queue::push — cppreference.com

De cppreference.com

<metanoindex/>

<tbody> </tbody>

void push( const T& value );

void push( T&& value );

(depuis C++11)

Pushes the given element value to the priority queue.

1) Effectively calls c.push_back(value); std::push_heap(c.begin(), c.end(), comp);

2) Effectively calls c.push_back(std::move(value)); std::push_heap(c.begin(), c.end(), comp);

Paramètres

value -

la valeur de l'élément à enfoncer

Original:

the value of the element to push

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Retourne la valeur

(Aucun)

Original:

(none)

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Complexité

Logarithmic number of comparisons plus the complexity of Container::push_back.

Voir aussi

construit des éléments en mémoire et trie le conteneur sous-jacent
(fonction membre publique) [edit]

supprime le premier élément

Original:

removes the first element

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.


(fonction membre publique) [edit]