title: Why does 'std::vector<int> b{2};' create a 1-element vector, and not a 2-element one?
body: <p>I've been playing around with C++11 for the past few days, and I came up with something strange.</p>
  
  <p>If I want to uniformly initialize an int:</p>
  
  <pre><code>int a{5};
  </code></pre>
  
  <p>But if I do the same thing to a std::vector:</p>
  
  <pre><code>std::vector&lt;int&gt; b{2};
  </code></pre>
  
  <p>Does not construct a two element array, but rather an array with one element of value two.  It seems like to get that effect one would need to be more explicit about it:</p>
  
  <pre><code>std::vector&lt;int&gt; c{{2}};
  std::vector&lt;int&gt; d = {2};
  </code></pre>
  
  <p>But not like the declaration of b - this seems inconsistent.  I have seen some other stuff to the same effect.  What I'm asking - is this behavior in the final C++11 standard, or is it just in a draft that was implemented early?  If so, why did the standards committee include this behavior?  It seems like it defeats the whole purpose of uniform initialization, as one has to remember which classes have initializer list constructors, and to use the old () syntax instead of {} with just those classes.  Or one forgoes uniform initialization altogether.</p>
  
  <p>This seems like a big "gotcha".  But there might be advantages to it that I am not aware of.</p>
  
  <p>Edit:  this code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  
  int main() {
      std::vector&lt;int&gt; a{2};
      for (auto x: a) {
          std::cout &lt;&lt; x &lt;&lt; std::endl;
      }
      return 0;
  }
  </code></pre>
  
  <p>outputs "2" on gcc 4.6.2</p>