title: How to zip ( combine iterators ) that don't handle boost::prior
body: <p>I have the following code to generate tuples of adjacent pairs in a range. This works for bidirectional ranges but not for forward only ranged.</p>
  
  <pre><code>    template &lt;typename Range&gt;
  
      // Returns a range of adjacent pairs of the input range
      auto make_adjacent_range(Range const &amp; r) -&gt; decltype(boost::combine(
              boost::make_iterator_range(boost::begin(r), boost::prior(boost::end(r))), 
              boost::make_iterator_range(boost::next(boost::begin(r)), boost::end(r))))
      {
          return boost::combine(
              boost::make_iterator_range(boost::begin(r), boost::prior(boost::end(r))), 
              boost::make_iterator_range(boost::next(boost::begin(r)), boost::end(r)));
      }
  </code></pre>
  
  <p><strong>boost::prior</strong> is not accepted with a forward only range. Is there an equally elegant solution that will work with forward ranges?</p>
  
  <p><a href="https://www.boost.org/doc/libs/1_67_0/libs/range/doc/html/range/reference/utilities/combine.html" rel="nofollow noreferrer">boost::combine</a></p>