title: Range-based loop for std::queue
body: <p>I'm trying to look for a substitute in <code>std::vector</code> in my project, and I found out that <code>std::queue</code> is what I'm looking for.</p>
  
  <p>I have lots of function that uses <code>range-based loop</code> for iteration and I'm trying to maintain it as far as I can.</p>
  
  <p>I try to compile a <code>range-based loop</code> in <code>std::queue</code> but all I get are compile errors</p>
  
  <blockquote>
    <p>error: no matching function for call to 'begin(std::queue&amp;)'</p>
  </blockquote>
  
  <p>Doesn't <code>std::queue</code> support range base loop?</p>
  
  <p>I did try <code>Google search</code> but didn't find any topic regarding to this.</p>
  
  <p><strong>Update:</strong></p>
  
  <p>My compiler is <code>GCC v4.7.1</code></p>
  
  <p><code>-std=c++11</code> is enabled</p>
  
  <p>And here's the faulty test code:</p>
  
  <pre><code>std::queue&lt;int&gt; Q;
  
  for (int i = 0;i &lt; 10; ++i)
      Q.push(i);
  
  std::cout &lt;&lt; "\nqueue contains: ";
  for (auto i : Q)
      std::cout &lt;&lt; i &lt;&lt; ", ";
  </code></pre>