Namespaces
Variants
Views
Actions

std::priority_queue::empty

From cppreference.com
bool empty() const;
(until C++20)
[[nodiscard]] bool empty() const;
(since C++20)

Checks if the underlying container has no elements, i.e. whether c.empty().

Contents

[edit] Parameters

(none)

[edit] Return value

true if the underlying container is empty, false otherwise

[edit] Complexity

Constant

[edit] See also

returns the number of elements
(public member function) [edit]