title: What are the C++ things one should know about polymorphism
body: <p>When using Polymorphism in C++, what are the important facts to know about it.</p>
  <p>Like, for example, when casting from <code>derived</code> to <code>base</code>, what should one be aware of?</p>
  <p>When is an upcast possible, and when not?
  When do you need a 'virtual' destructor and when not?</p>
  <p>What do you need to be aware of when using pointers from base to derived objects?</p>
  <p>There was a <a href="https://chat.stackoverflow.com/transcript/message/1235055#1235055">discussion in the C++ lounge</a> just now about the <code>sizeof(*this)</code> with polymorphic types, which inspired me to ask this question.</p>
  <p>An &quot;obscure&quot; fact such as this one:</p>
  <p>&quot;If you have a Derived that's hidden behind a Base&amp;, then the static type is Base, while the dynamic type is Derived.&quot;</p>
  <p>Is also the kind of things I am looking for, in this question.</p>