sequence_range< ValueT, XformT, RangeTs > Struct Template Reference
Range adaptor that transduces the ranges in RangeTs
with the transducer XformT
, producing values of ValueT
.
More...
#include <atria/xform/sequence.hpp>
Classes | |
struct | iterator |
Public Types | |
using | data_t = detail::sequence_data< ValueT, XformT, decltype(std::begin(std::declval< const RangeTs & >()))... > |
using | value_type = const ValueT |
using | const_iterator = iterator |
Public Member Functions | |
sequence_range (XformT xform, const RangeTs &...ranges) | |
iterator | begin () const |
iterator | end () const |
Detailed Description
template<typename ValueT, typename XformT, typename... RangeTs>
struct atria::xform::sequence_range< ValueT, XformT, RangeTs >
Range adaptor that transduces the ranges in RangeTs
with the transducer XformT
, producing values of ValueT
.
It also works with no range, as a generator.
- Note
- There is no shared data between the range iterators excepting the adapted ranges, for which a const reference is kept. This means that it is safe to copy the iterators around and use them from different threads. It is also safe to use the iterators after the parent
sequence_range
is destroyed, but the adapted ranges should still be kept alive. - The transducer is processed every time for each iterator. Thus, any side effects the transducer might cause will be produced whenever we run on each iterator of the range.
- The transducer is processed lazily. It is ok to adapt infinite ranges or infinite generators.
Definition at line 190 of file sequence.hpp.
The documentation for this struct was generated from the following file:
- src/atria/xform/sequence.hpp