title: Is a std::unique_ptr moved into a std::vector when using push_back?
body: <p>I have a question about how a <code>std::unique_ptr</code> is inserted into a <code>std::vector</code>. Imagine I have a function that produces objects as follows:</p>
  
  <pre><code>std::unique_ptr&lt;CObject&gt; createObjects()
  {
      return std::unique_ptr&lt;CObject&gt; (new CObject());
  }
  </code></pre>
  
  <p>Now in my code, I have a <code>std::vector&lt;std::unique_ptr&lt;CObjects&gt;&gt; vec</code> and I insert elements like so:</p>
  
  <pre><code>vec.push_back(createObjects());
  </code></pre>
  
  <p>Now my question is: Is the <code>unique_ptr</code> moved into the vector or is it copied?</p>