id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 10894,"Add an adaptor to iterate a range in pairs of (current element, next element)",Matthäus Brandl (brandl.matthaeus@… com),Neil Groves,"An often needed functionality is iterating a range and accessing the current and next element of the range. Currently this can be done as follows: {{{#!C++ assert(someVec.size > 1); for(auto const & pair, boost::make_iterator_range( boost::make_zip_iterator( boost::make_tuple( someVec.cbegin(), std::next(someVec.cbegin()))), boost::make_zip_iterator( boost::make_tuple( std::prev(someVec.cend()), someVec.cend()))) ) { auto current = boost::get<0>(pair); auto next = boost::get<1>(pair); } }}} An adaptor would strongly increase readability: {{{#!C++ assert(someVec.size > 1); using boost::adaptors::operator|; for(auto const & pair, someVec | boost::adaptors::paired()) { pair.current(); pair.next(); } }}} Of course the difference between current and next could be made customizable as well.",Feature Requests,new,To Be Determined,range,Boost Development Trunk,Not Applicable,,range adaptor pairwise,