Boost logo

Boost :

From: Andres Llopis (allopis_at_[hidden])
Date: 2019-12-06 08:55:57

Hi everyone,

I am trying to make my own version of combine so that it works also with std::tuples. Someone on slack suggested that the zip iterator should be able to handle it properly. My attempt however fails when trying to use the metafunction tuple_of_references::type for the std::tuple of iterators. This is what I tried (

(Please excuse any style problems, this is my first post)

namespace myns

using boost::iterators::zip_iterator;
using boost::iterator_range;

template<typename IterTuple>
class combined_range
: public iterator_range<zip_iterator<IterTuple> >
typedef iterator_range<zip_iterator<IterTuple> > base;
    combined_range(IterTuple first, IterTuple last)
    : base(first, last)

template<typename... Ranges>
auto combine(Ranges&&... rngs) ->
    return combined_range<decltype(std::make_tuple(std::begin(rngs)...))>(


Boost list run by bdawes at, gregod at, cpdaniel at, john at