title: C++ How to add queue of unique_ptr's to a vector
body: <p>Simplified code:</p>
  
  <pre><code>#include &lt;queue&gt;
  #include &lt;memory&gt;
  #include &lt;vector&gt;
  
  class Foo {
  public:
      Foo() {};
      virtual ~Foo() {}
  };
  
  int main()
  {
      std::queue&lt;std::unique_ptr&lt;Foo&gt;&gt; queue;
      auto element = std::make_unique&lt;Foo&gt;();
      queue.push(std::move(element));
      std::vector&lt;std::queue&lt;std::unique_ptr&lt;Foo&gt;&gt;&gt; vector;
      // Error 1
      vector.push_back(queue); 
      // Error 2
      vector.push_back(std::move(queue));
      // Error 3
      vector.push_back({});
      return 0;
  }
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>'std::unique_ptr>::unique_ptr(const
    std::unique_ptr&lt;_Ty,std::default_delete&lt;_Ty>> &amp;)': attempting to
    reference a deleted function</p>
  </blockquote>
  
  <p>Obviously copying c~tor of unique_ptr is removed but I'm not trying to copy it. Am I?</p>