[priqueue.special]

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

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

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

#### 23.6.4.5 Specialized algorithms [priqueue.special]

[ð](#lib:swap,priority_queue)

`template<class T, class Container, class Compare>
  constexpr void swap(priority_queue<T, Container, Compare>& x,
                      priority_queue<T, Container, Compare>& y) noexcept(noexcept(x.swap(y)));
`

[1](#1)

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

*Constraints*: is_swappable_v<Container> is true andis_swappable_v<Compare> is true[.](#1.sentence-1)

[2](#2)

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

*Effects*: As if by x.swap(y)[.](#2.sentence-1)
