title: Iterator for set of pairs is const?
body: <p>I get the following error message: </p>
  
  <blockquote>
    <p>"expression must be a modifiable lvalue iter->first = iter->second;"</p>
  </blockquote>
  
  <p>for the code:</p>
  
  <pre><code>func( const std::set&lt;Edge&gt; &amp;obstructEdges1,
        const std::set&lt;Edge&gt; &amp;obstructEdges2 )
  {
  std::set&lt;Edge&gt; obstructEdges = obstructEdges1;
  obstructEdges.insert( obstructEdges2.begin(), obstructEdges2.end() );
  
  for ( std::set&lt;Edge&gt;::iterator iter = obstructEdges.begin();
      iter != obstructEdges.end(); iter++ )
  {
    if ( iter-&gt;first &gt; iter-&gt;second )
    {
      int t = iter-&gt;first;
      iter-&gt;first = iter-&gt;second;
      iter-&gt;second = t;
    }
  ...
  </code></pre>
  
  <p><code>Edge</code> is a pair of ints. What's wrong? Looks like <code>iter-&gt;first</code> is considered <code>const</code> for some reason.</p>