Can't pass 'const pointer const' to const ref : <p>Suppose you have a set of pointers (yeah...) :</p>

<pre><code>std::set&lt;SomeType*&gt; myTypeContainer;
</code></pre>

<p>Then suppose that you want to search this set from a const method of SomeType:</p>

<pre><code>bool SomeType::IsContainered() const
{
    return myTypeContainer.find(this) != myTypeContainer.end();
}
</code></pre>

<p>This doesn't work. The <code>this</code> ptr in the method is a <code>const SomeType *const</code>, which I can't put into the <code>find</code>. The issue being that <code>find</code> takes a const-ref, which in this case would mean that the passed pointer is treated as const, but not the thing it points to.</p>

<p>Is there a way to resolve this smoothly (without changing the set template type)?</p>
