title: Passing std::vector of derived type where a std::vector of base type is expected
body: <p>I have a base class:</p>
  
  <pre><code>class Member
  {
      ....
  }
  </code></pre>
  
  <p>and a derived class, like this:</p>
  
  <pre><code>class Mine_sweeper : private Member
  {
      ....
  }
  </code></pre>
  
  <p>Then I have a container:</p>
  
  <pre><code>class Population
  {
  public:
      std::vector&lt;Member&gt;&amp; m_members;
      Population(std::vector&lt;Member&gt;&amp; members);
  }
  </code></pre>
  
  <p>When I use Population's constructor with a vector of Members it compiles OK. But if I try to link Population's m_members with a vector of Mine_sweepers, complier throws an error.</p>
  
  <pre><code>std::vector&lt;Member&gt; members;
  Population pop(members); // this compiles OK
  
  std::vector&lt;Mine_sweeper&gt; sweepers;
  Population pop(sweepers); // but here I get an error
  </code></pre>
  
  <pre>main.cpp(23): error C2664: 'Population::Population(std::vector &)' : cannot convert parameter 1 from 'std::vector' to 'std::vector &'</pre>