title: Using a std::unordered_set of std::unique_ptr
body: <p>Assume I have a set of unique_ptr:</p>
  
  <pre><code>std::unordered_set &lt;std::unique_ptr &lt;MyClass&gt;&gt; my_set;
  </code></pre>
  
  <p>I'm not sure what's the safe way to check if a given pointer exists in the set. The normal way to do it may be to call <code>my_set.find ()</code>, but what do I pass as a parameter?</p>
  
  <p>All I have from the outside is a raw pointer. So I have to create another unique_ptr from the pointer, pass it to <code>find()</code> and then <code>release()</code> that pointer, otherwise the object would get destructed (twice). Of course, this process can be done in a function, so the caller can pass the raw pointer and I do the conversions.</p>
  
  <p>Is this method safe? Is there a better way to work with a set of unique_ptr?</p>