title: Can't assign to return value because function 'operator->' returns a const value
body: <p>I am trying to do dfs over a graph defined as <code>unordered_map&lt;string,set&lt;pair&lt;string,int&gt;&gt;&gt; g;</code></p>
  <p>So here is my dfs code:</p>
  <pre><code>void dfs(string u){
          for(auto v=g[u].begin();v!=g[u].end();v++){
              if(!v-&gt;second){
                  cout&lt;&lt;v-&gt;first&lt;&lt;endl;
                  res.push_back(v-&gt;first);
                  v-&gt;second = 1; 
                  dfs(v-&gt;first);
              }
          }
      }
  </code></pre>
  <p>I am trying to change the value of v-&gt;second to 1, but I am getting an error of</p>
  <pre><code>cannot assign to return value because function 'operator-&gt;' returns a const value
                  v-&gt;second = 1;
  </code></pre>
  <p>So is there any other way to change the second value of the pair?</p>