title: Why can't I construct a queue/stack with brace-enclosed initializer lists? (C++11)
body: <p><strong>Program 1:</strong>  </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cstdlib&gt;
  #include &lt;vector&gt;
  
  int main(){
  
      //compiles successfully 
      std::vector&lt;int&gt; vec{1,2,3,4,5};
  
      return EXIT_SUCCESS;
  }
  </code></pre>
  
  <hr>
  
  <p><strong>Program 2:</strong>  </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cstdlib&gt;
  #include &lt;queue&gt;
  
  int main(){
  
      //compiler error
      std::queue&lt;int&gt; que{1,2,3,4,5};
  
      return EXIT_SUCCESS;
  }
  </code></pre>
  
  <p><strong>Error message:</strong></p>
  
  <pre><code>main.cpp: In function ‘int main()’:
  main.cpp:7:31: error: no matching function for call to ‘std::queue&lt;int&gt;::queue(&lt;brace-enclosed initializer list&gt;)’
  main.cpp:7:31: note: candidates are:
  /usr/include/c++/4.6/bits/stl_queue.h:141:7: note: std::queue&lt;_Tp, _Sequence&gt;::queue(_Sequence&amp;&amp;) [with _Tp = int, _Sequence = std::deque&lt;int, std::allocator&lt;int&gt; &gt;]
  /usr/include/c++/4.6/bits/stl_queue.h:141:7: note:   candidate expects 1 argument, 5 provided
  /usr/include/c++/4.6/bits/stl_queue.h:137:7: note: std::queue&lt;_Tp, _Sequence&gt;::queue(const _Sequence&amp;) [with _Tp = int, _Sequence = std::deque&lt;int, std::allocator&lt;int&gt; &gt;]
  /usr/include/c++/4.6/bits/stl_queue.h:137:7: note:   candidate expects 1 argument, 5 provided
  /usr/include/c++/4.6/bits/stl_queue.h:92:11: note: std::queue&lt;int&gt;::queue(const std::queue&lt;int&gt;&amp;)
  /usr/include/c++/4.6/bits/stl_queue.h:92:11: note:   candidate expects 1 argument, 5 provided
  /usr/include/c++/4.6/bits/stl_queue.h:92:11: note: std::queue&lt;int&gt;::queue(std::queue&lt;int&gt;&amp;&amp;)
  /usr/include/c++/4.6/bits/stl_queue.h:92:11: note:   candidate expects 1 argument, 5 provided
  </code></pre>
  
  <p><strong>Question:</strong><br>
  why can't queues be initialized like vectors?<br>
  I suppose they aren't sequence containers, but why would that matter?<br>
  I'm sure there is a good reason, but I can't find any explanations.</p>
  
  <p>gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1</p>