std::ranges::subrange<I,S,K>::empty

From cppreference.com
< cpp‎ | ranges‎ | subrange
 
 
Ranges library
Range access
Range conversions
(C++23)
Range primitives



Dangling iterator handling
Range concepts
Views

Range factories
Range adaptors
Range generators
Range adaptor objects
Range adaptor closure objects
Helper items
(until C++23)(C++23)


 
std::ranges::subrange
Member functions
Observers
subrange::empty
(C++20)
Iterator operations
Deduction guides
Non-member functions
(C++20)
Helper types
(C++20)
 
constexpr bool empty() const;
(since C++20)

Checks whether the subrange is empty, i.e. the stored iterator and sentinel compare equal.

Parameters

(none)

Return value

true if the stored iterator and sentinel compare equal, false otherwise.

Example

See also

(C++20)
obtains the size of the subrange
(public member function)
(C++17)
checks whether the container is empty
(function template)
checks whether a range is empty
(customization point object)