any way to have std::unordered_set<Base>::count(Derived c)?
<p>Lets say I have an abstract base class and a derived class with some unique functionality:</p>

<pre><code>class Shape
{
    public:
    Shape();
};

class Circle : public Shape
{
    public:
    Circle(int radius) : radius(radius);
    int getRadius() { return this-&gt;radius; };
    private:
    int radius;
};
</code></pre>

<p>Now I can put Circle*:s in std::vector and check afterwards if vector has Shape*</p>

<pre><code>std::vector&lt; Circle* &gt; v;

Circle* circle = new Circle(1);

v.push_back(circle);

// ...

Shape* someShape = ...; // I know it's a Circle but the pointer comes from class that only knows about Shapes

for(std::vector&lt; Circle* &gt;::iterator it = v.begin(); it != v.end(); ++it)
{
    Circle* c = *it;
    if((Shape)c == someShape)
    {
        // found
    }
}

// ...

delete c;
</code></pre>

<p>But I want to use std::unordered_set (applies also to std::unordered_map, std::set, std::map) because it has faster-than-linear find() and count()</p>

<pre><code>std::unordered_set&lt; Circle* &gt; u;

Circle* circle = new Circle(1);

u.insert(circle);

// ...

Shape* someShape = ...; // I know it's a Circle but the pointer comes from class that only knows about Shapes

if(u.count(someShape) == 1)
{
    // found
}
</code></pre>

<p>Instead of the obivious I get "undefined function" as there only exists std::unordered_set&lt; Key >::count(Key&amp; k);</p>

<p>Is there any way I can find() or count() from std::unordered_set using base class?</p>
