title: Moving unique_ptr in the declaration of a vector
body: <p>I try to move some unique_ptr in a vector during it declaration and I get a error. I think that I make a copy without knowing it.</p>
  
  <p>I don't understand why I get the problem at the declaration while it works very well during a push_back. </p>
  
  <p>I simplified the problem in few lines.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  #include &lt;memory&gt;
  using namespace std;
  
  int main() {
  
      unique_ptr&lt;int&gt; i1 = make_unique&lt;int&gt;(142);
      unique_ptr&lt;int&gt; i2 = make_unique&lt;int&gt;(242);
      unique_ptr&lt;int&gt; i3 = make_unique&lt;int&gt;(342);
  
  
      vector&lt;unique_ptr&lt;int&gt;&gt; v;
  
      //Those lines work
      v.push_back(move(i1));
      v.push_back(move(i2));
      v.push_back(move(i3));
  
      //ERROR
      vector&lt;unique_ptr&lt;int&gt;&gt; v2 {move(i1), move(i2), move(i3)}; 
  
      return 0;
  }
  </code></pre>
  
  <p>The error is : </p>
  
  <pre><code>use of deleted function 'std::unique_ptr&lt;_Tp, _Dp&gt;::unique_ptr(const
  std::unique_ptr&lt;_Tp, _Dp&gt;&amp;) [with _Tp = int; _Dp =
  std::default_delete&lt;int&gt;]'
       { ::new(static_cast&lt;void*&gt;(__p)) _T1(std::forward&lt;_Args&gt;(__args)...); }
  </code></pre>
  
  <p>What am I missing ?</p>
  
  <p>Thanks !</p>