C++ dynamic cast
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/28002/regular-cast-vs-static-cast-vs-dynamic-cast">Regular cast vs. static_cast vs. dynamic_cast</a>  </p>
</blockquote>



<p>is there any harm in using static_cast when I know the type for sure?
Any issue if it has virtual functions?</p>

<pre><code>class Base {
public:
    virtual void foo();
};

class Derived1 {
public:
    virtual void foo();
    void bar();
};


Base* b1 = new Derived1();
Derived1* d1 = static_cast&lt;Derived1*&gt;b1;
d1-&gt;bar();
</code></pre>
