title: Downcasting `vector<Parent>`
body: <p>I have a problem with upcasting and downcasting in my program. I have a <code>vector&lt;Child&gt;</code> that is passed to a function that expects <code>const vector&lt;Parent&gt;&amp; pp</code>. There are no problems up to here (EDIT: apparently there are! See the comments). But, now I want to pass <code>pp</code> to a function that expects <code>const vector&lt;Child&gt;&amp; cc</code>, Which I cannot do.</p>
  
  <p>How should I do this, while at the same time I do not give the functions the ability to modify the original classes? Could you list various ways of doing this, preferably with their pros and cons?</p>