title: queue.front() in C++ returns a strange value
body: <p>I'm coding in C++ and making use of the  library.
  My code goes something like this:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>struct request {
      int order;
      float size;
  };
  typedef struct request req;
  .. ...
  std::queue &lt;req&gt; wait_queue;
  // ...
  for (int i = 0; i &lt; 5; i++) {
      req r;
      r.order = i + 1;
      r.size = 100;
      wait_queue.push(r);
  }
  // ...
  if (!wait_queue.empty()) {
      req r = wait_queue.front();
      // do something...
  }
  </code></pre>
  
  <p>Where the <code>req r</code> do not conflict because they're defined in different functions in actuality.
  Now I know the variables are saved correctly because when I run <code>gdb</code> and type <code>p wait_queue</code> it shows:</p>
  
  <pre><code>(gdb) $1 = std::queue wrapping: std::deque with 5 elements = {{order = 1, size = 100}, {order = 2, size = 100}, {order = 3, 
      size = 100}, {order = 4, size = 100}, {order = 5, size = 100}}
  </code></pre>
  
  <p>But after <code>r = wait_queue.front()</code>, <code>p r</code> shows:</p>
  
  <pre><code>(gdb) $2 = {order = 6417952, size = 0}
  </code></pre>
  
  <p>So I want to know how this can happen, and what I can do to make sure <code>r</code> will hold <code>{order = 1, size = 100}</code>.</p>
  
  <p>Thanks in advance!</p>