1 #ifndef gamgee__zip__guard
2 #define gamgee__zip__guard
4 #include <boost/format.hpp>
5 #include <boost/iterator/zip_iterator.hpp>
6 #include <boost/range.hpp>
25 template <
typename...
T>
26 auto zip(
const T&... containers) -> boost::iterator_range<boost::zip_iterator<decltype(boost::make_tuple(containers.begin()...))>>
28 auto zip_begin = boost::make_zip_iterator(boost::make_tuple(std::begin(containers)...));
29 auto zip_end = boost::make_zip_iterator(boost::make_tuple(std::end(containers)...));
30 return boost::make_iterator_range(zip_begin, zip_end);
auto zip(const T &...containers) -> boost::iterator_range< boost::zip_iterator< decltype(boost::make_tuple(containers.begin()...))>>
utility method to zip iterators together with simpler syntax than boost
Definition: zip.h:26
Definition: exceptions.h:9