5.0.0
Freundlich's C++ toolkit
Loading...
Searching...
No Matches
fcppt.range

Description

Range utilities.

Classes

struct  fcppt::range::hash< Type >
 Hashes a range. More...

Functions

template<typename Iterator>
std::ranges::subrange< Iterator > fcppt::range::from_pair (std::pair< Iterator, Iterator > const &_range)
 Creates a range from a std::pair.
template<typename Range>
auto fcppt::range::nonconst_size (Range const &_range)
 Returns the size of a range using std::distance.
template<typename Range>
bool fcppt::range::singular (Range const &_range)
 Tests if a range consists of a single element.

Function Documentation

◆ from_pair()

template<typename Iterator>
std::ranges::subrange< Iterator > fcppt::range::from_pair ( std::pair< Iterator, Iterator > const & _range)
inlinenodiscard

Creates a range from a std::pair.

◆ nonconst_size()

template<typename Range>
auto fcppt::range::nonconst_size ( Range const & _range)
inline

Returns the size of a range using std::distance.

Depending on the range used, this might not run in constant time.

◆ singular()

template<typename Range>
bool fcppt::range::singular ( Range const & _range)

Tests if a range consists of a single element.