28 #ifndef LIB_ITER_ZIP_H 29 #define LIB_ITER_ZIP_H 43 template<
typename...ITS>
47 return std::make_tuple (
lib::explore (std::forward<ITS> (iters)) ...);
61 : iters_{move (iterTup)}
70 return cor1.iters_ == cor2.iters_;
79 return std::apply ([](
auto&... its) {
return (
bool(its) and ...); }
86 return util::unConst(iters_);
93 ,[](
auto& it){ ++it; });
109 meta::forEach (iters_
110 ,[](
auto& it){ it.expandChildren(); });
117 meta::forEach (iters_
118 ,[&](
auto& it){ maxDepth = std::max (maxDepth, it.depth()); });
136 template<
class...ITS>
140 auto access_result = [](
auto& it)->decltype(
auto){
return *it; };
141 auto tuple_results = [&](
auto& it){
return meta::mapEach (*it, access_result); };
143 auto core = iter::ProductCore{iter::buildIterTuple (std::forward<ITS> (iters)...)};
145 return explore (std::move(core))
146 .transform (tuple_results);
150 template<
class...ITS>
154 return zip (eachNum<size_t>(), std::forward<ITS>(iters)...);
auto explore(IT &&srcSeq)
start building a IterExplorer by suitably wrapping the given iterable source.
auto izip(ITS &&...iters)
tuple-combining iterator prefixed by index sequence
Helper template(s) for creating Lumiera Forward Iterators.
auto buildIterTuple(ITS &&...iters)
construction-helper: apply IterExplorer builder packaged tuple
void expandChildren()
delegate to the IterExplorers in the tuple
Implementation namespace for support and library code.
Metaprogramming with tuples-of-types and the std::tuple record.
ITUP & yield() const
< exposing the iterator-tuple itself as »product«
ITUP TAG_IterExplorer_BaseAdapter
instruct a follow-up IterAdapter not to add a BaseAdapter but rather to connect to the dispatcher fun...
Building block for a tupeled-iterator.
Building tree expanding and backtracking evaluations within hierarchical scopes.
auto zip(ITS &&...iters)
Build a tuple-combining iterator builder.