title: how to assign to element of set of pairs through find iterator result
body: <p>I have a set of pairs and I want to change the second field of some pair that I want find first:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;utility&gt;
  #include &lt;set&gt;
  
  int main(){
    auto p=std::make_pair(2,3);
    std::set&lt;std::pair&lt;int,int&gt;&gt; s{p};
    auto it=s.find(p);
    it-&gt;second=5; // compilation error
    if(it!=s.end()) std::cout &lt;&lt; it-&gt;second &lt;&lt; '\n';
  }
  </code></pre>
  
  <p>The above code fails to compile because it complains that the iterator result of find cannot be assigned to. However, I don't see why it is a const iterator.</p>
  
  <p>What is wrong with the above, and how do I assign to the pair that the iterator result of find points to?</p>