Simple-Vector v1.3.0
|
Generator which retrieves its values out of the given source iterator. More...
#include <Generators.hpp>
Public Types | |
using | range_type = std::conditional_t< std::ranges::borrowed_range< TRange >, TRange, std::remove_cvref_t< TRange > > |
using | iterator_type = std::ranges::iterator_t< range_type > |
using | value_type = std::ranges::range_value_t< TRange > |
Public Member Functions | |
constexpr | range (TRange &&range) |
Constructs the generator with a given range. More... | |
constexpr value_type | operator() () |
post-increments the stored iterator and returns a copy of the previously pointed element. More... | |
Generator which retrieves its values out of the given source iterator.
TRange | type of source range |
If the given range is a borrowed range then the generator will use that type as range_type, otherwise the whole source range will be stored internally.
using sl::vec::gen::range< TRange >::iterator_type = std::ranges::iterator_t<range_type> |
using sl::vec::gen::range< TRange >::range_type = std::conditional_t < std::ranges::borrowed_range<TRange>, TRange, std::remove_cvref_t<TRange> > |
using sl::vec::gen::range< TRange >::value_type = std::ranges::range_value_t<TRange> |
|
inlineexplicitconstexpr |
Constructs the generator with a given range.
range | The source range to be used |
|
inlineconstexpr |
post-increments the stored iterator and returns a copy of the previously pointed element.