title: Is there a way to intersect/diff a std::map and a std::set?
body: <p>I'm wondering if there a way to intersect or make the differences between two structures defined as <code>std::set&lt;MyData*&gt;</code> and <code>std::map&lt;MyData*, MyValue&gt;</code> with standard algorithms (like <code>std::set_intersect</code>)</p>
  
  <p>The problem is that I need to compute the difference between the set and the keyset of the map but I would like to avoid reallocating it (since it's something that is done many times per second with large data structures). Is there a way to obtain a "key view" of the <code>std::map</code>? After all what I'm looking is to consider just the keys when doing the set operation so from an implementation point it should be possible but I haven't been able to find anything.</p>