title: Using std::map::extract to modify key
body: <p>My implementation uses std::map to store data. When I started my code it seemed like the best option. Now I came to a point where I have to change the key values of all objects inside the map.</p>
  
  <p>The problem is that each object points to another object inside the map:</p>
  
  <pre><code>class AND : public node{
      vector &lt;node*&gt; inputs;
      vector &lt;node*&gt; outputs;
  }
  </code></pre>
  
  <p>And the map is declared like this:</p>
  
  <pre><code>map&lt;unsigned int, AND&gt; all_ANDs;
  </code></pre>
  
  <p><strong>My question is:</strong> If I use map::extract from C++17 to modify the key values in all_ANDs map, will my pointers (E.g. the ones inside the attribute inputs) keep pointing to the right places?</p>
  
  <p><strong>In other words:</strong> If I change the value of "first" element with extract, the address of "second" will keep intact?</p>
  
  <p>I noticed from <a href="https://en.cppreference.com/w/cpp/container/map/extract" rel="nofollow noreferrer">this link</a> that the string "papaya" stays the same (and works gracefully). But I wanted to be sure about pointers.</p>