title: Differences between direct-list-initialization and copy-list-initialization
body: <p>I would like to know if there is any difference the following two types of <code>std::vector</code> initialization in C++11 and later.</p>
  
  <pre><code>std::vector&lt;int&gt; v1 {1, 2, 3, 4, 5};
  std::vector&lt;int&gt; v2 = {1, 2, 3, 4, 5};
  </code></pre>
  
  <p>Here is a complete code example that works fine.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  
  int main()
  {
      std::vector&lt;int&gt; v1 {1, 2, 3, 4, 5};
      std::vector&lt;int&gt; v2 = {1, 2, 3, 4, 5};
  
      std::cout &lt;&lt; v1.size() &lt;&lt; '\n';
      std::cout &lt;&lt; v2.size() &lt;&lt; '\n';
  }
  </code></pre>
  
  <p>I see both initializations leading to identical results.</p>
  
  <p>The example at <a href="http://en.cppreference.com/w/cpp/container/vector" rel="noreferrer">http://en.cppreference.com/w/cpp/container/vector</a> uses the second kind, so that got me thinking if this kind of initialization has any advantage.</p>
  
  <p>In general, I want to know if one initialization has a specific technical advantage over the other, or if one initialization is considered best-practice while the other is not, and if so why.</p>
  
  <p>Especially, what I am concerned about is whether the copy-list-initialization has additional overhead due to temporary objects and copying?</p>