title: How can I check if this is last member of std::list?
body: <p>I have a list like below </p>
  
  <pre><code>typedef std::list&lt;std::string&gt; SegmentValue;
  </code></pre>
  
  <p>then in a iteration I need check if this is last iteration.</p>
  
  <pre><code>     for(Field::SegmentValue::const_iterator it = m_segmentValue.begin();It != 
             m_segmentValue.end();It++){
                if((segIt + 1) == m_segmentValue.end())//last iteration
                ...
          }
  </code></pre>
  
  <p>but I get error in compile that:</p>
  
  <pre><code> error C2678: binary '+' : no operator found which takes a left-hand operand of type 'std::list&lt;_Ty&gt;::_Const_iterator&lt;_Secure_validation&gt;'
  </code></pre>
  
  <p>how I can check if this is last itration?</p>