title: How to get the second to last element from a multi_index_container
body: <p>I have a <code>boost::multi_index_container</code> indexed by <code>hashed_unique</code> and <code>sequenced</code>. How can I get the second from the last element from this container?</p>
  
  <pre><code>struct MyContainer : public mi::multi_index_container&lt;
      MyStruct,
      mi::indexed_by&lt;
          mi::hashed_unique&lt;
            mi::tag&lt;hashed&gt;,
            %some stuff%,
            %some stuff%,
            %some stuff%&gt;
          &gt;,
          mi::sequenced&lt;mi::tag&lt;sequenced&gt; &gt;
      &gt;
  &gt;
  { };
  </code></pre>
  
  <p>As the container is hashed, I can find any element by its hash. But in my case, I do not know the hash of the second-to-last element. However, I know the hash of the last element and hence can get the last element.</p>
  
  <pre><code>MyContainer::iterator myIter = m_table.find(hashOfLast);
  </code></pre>
  
  <p>Can I use this <code>myIter</code> to get an iterator to the previous element?</p>
  
  <p>Edit:</p>
  
  <p>Can I do something like this?</p>
  
  <pre><code>MyContainer::nth_index&lt;1&gt;::type&amp; seqIdx = m_table.get&lt;1&gt;();
  auto current = seqIdx.rbegin();
  auto last = seqIdx.rend();
  
  if(current != last){
      current++;
      //How to get the hash of this element now?
  }
  </code></pre>