[priqueue.members]

# 23 Containers library [[containers]](./#containers)

## 23.6 Container adaptors [[container.adaptors]](container.adaptors#priqueue.members)

### 23.6.4 Class template priority_queue [[priority.queue]](priority.queue#priqueue.members)

#### 23.6.4.4 Members [priqueue.members]

[ð](#lib:push,priority_queue)

`constexpr void push(const value_type& x);
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L16409)

*Effects*: As if by:c.push_back(x);
push_heap(c.begin(), c.end(), comp);

[ð](#lib:push,priority_queue_)

`constexpr void push(value_type&& x);
`

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L16424)

*Effects*: As if by:c.push_back(std::move(x));
push_heap(c.begin(), c.end(), comp);

[ð](#lib:push_range,priority_queue)

`template<[container-compatible-range](container.intro.reqmts#concept:container-compatible-range "23.2.2.1 Introduction [container.intro.reqmts]")<T> R>
  constexpr void push_range(R&& rg);
`

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L16440)

*Effects*: Inserts all elements of rg in c viac.append_range(std​::​forward<R>(rg)) if that is a valid expression, orranges​::​copy(rg, back_inserter(c)) otherwise[.](#3.sentence-1)

Then restores the heap property as if bymake_heap(c.begin(), c.end(), comp)[.](#3.sentence-2)

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L16448)

*Postconditions*: is_heap(c.begin(), c.end(), comp) is true[.](#4.sentence-1)

[ð](#lib:emplace,priority_queue)

`template<class... Args> constexpr void emplace(Args&&... args);
`

[5](#5)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L16459)

*Effects*: As if by:c.emplace_back(std::forward<Args>(args)...);
push_heap(c.begin(), c.end(), comp);

[ð](#lib:pop,priority_queue)

`constexpr void pop();
`

[6](#6)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L16474)

*Effects*: As if by:pop_heap(c.begin(), c.end(), comp);
c.pop_back();
