Namespaces
Variants
Views
Actions

std::flat_set<Key,Compare,KeyContainer>::empty

From cppreference.com
< cpp‎ | container‎ | flat set
Revision as of 10:20, 23 December 2023 by Space Mission (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 
 
 
 
bool empty() const noexcept;
(since C++23)

Checks if the container has no elements, i.e. whether begin() == end().

Contents

Parameters

(none)

Return value

true if the container is empty, false otherwise.

Complexity

Constant.

Example

Template:cpp/container/flat set/example empty

See also

returns the number of elements
(public member function) [edit]
(C++17)
checks whether the container is empty
(function template) [edit]