title: Instantiate unique_ptr to derived class from vector of base class where derived class has been stored
body: <p>Consider following piece of code:</p>
  
  <pre><code>struct  Fruit
  {
     Fruit() {}
     virtual ~Fruit() {}       
     std::string name;
  };
  
  struct Banana : public Fruit
  {
     std::string color;
  };
  
  struct Pineapple : public Fruit
  {
     int weight;
  };
  </code></pre>
  
  <p>here is my main() : </p>
  
  <pre><code>int main()
  {
      std::vector&lt;std::unique_ptr&lt;Fruit&gt;&gt; product;
      product.push_back(std::unique_ptr&lt;Banana&gt;(new Banana)); //product[0] is a Banana
      product.emplace_back(new Pineapple);
  
      // I need to acess the "color" member of product[0]
      std::unique_ptr&lt;Banana&gt; b = std::move(product[0]); // this doesn't work, why?
      auto c = b-&gt;color;
  }
  </code></pre>
  
  <p>in <code>product[0]</code> I store a unique_ptr to Banana, why can't I assign it to a banana unique_ptr ? </p>