title: How to access the 'previous' element in a C++ list iterator loop?
body: <p>I'm trying to access the previously iterated element in a loop going through all the elements of a list.</p>
  
  <p>To be more specific, my loop looks like this:</p>
  
  <pre><code>for (iter=list_object.begin(); iter!= list_object_.end(); iter++)
    {
      function_1(*iter);
      function_2(*PREVIOUS_VALUE_IN_THE_LIST);
    }
  </code></pre>
  
  <p>How do I access this previous value in the list?</p>