title: Can I convert a reverse iterator to a forward iterator?
body: <p>I have a class called <code>Action</code>, which is essentially a wrapper around a deque of <code>Move</code> objects.</p>
  <p>Because I need to traverse the deque of <code>Moves</code> both forward and backwards, I have a forward iterator and a reverse_iterator as member variables of the class.  The reason for this is becuase I need to know when I have gone one past the &quot;end&quot; of the deque, both when I am going forwards or backwards.</p>
  <p>The class looks like this:</p>
  <pre><code>class Action
  {
  public:
      SetMoves(std::deque&lt;Move&gt; &amp; dmoves) { _moves = dmoves; }
      void Advance();
      bool Finished() 
      {
          if( bForward )
              return (currentfwd==_moves.end());
          else
              return (currentbck==_moves.rend());
      }
  private:
      std::deque&lt;Move&gt; _moves;
      std::deque&lt;Move&gt;::const_iterator currentfwd;
      std::deque&lt;Move&gt;::const_reverse_iterator currentbck;
      bool bForward;
  };
  </code></pre>
  <p>The <code>Advance</code> function is as follows:</p>
  <pre><code>void Action::Advance
  {
      if( bForward)
          currentfwd++;
      else
          currentbck++;
  }
  </code></pre>
  <p>My problem is, I want to be able to retrieve an iterator to the current <code>Move</code> object, without needing to query whether I am going forwards or backwards. This means one function returning one type of iterator, but I have two types.</p>
  <p>Should I forget returning an iterator, and return a const reference to a  <code>Move</code> object instead?</p>