title: Why doesn't std::move() of unique_ptr from list<unique_ptr> really move it?
body: <pre><code>using Ptr = std::unique_ptr&lt;int&gt;;
  
  Ptr f(bool arg) {
    std::list&lt;Ptr&gt; list;
    Ptr ptr(new int(1));
    list.push_back(std::move(ptr));
  
    if (arg) {
      Ptr&amp;&amp; obj1 = std::move(list.front());
      // Here |obj1| and |list.front()| still point to the same location!
      list.pop_front();
      return std::move(obj1);
    }
    else {
      Ptr obj2 = std::move(list.front());
      list.pop_front();
      return obj2;
    }
  };
  
  Ptr&amp;&amp; ptr1 = f(true);   // |ptr1| is empty.
  Ptr&amp;&amp; ptr2 = f(false);  // |ptr2| is fine.
  </code></pre>
  
  <p>The full source is <a href="http://ideone.com/AEP92v" rel="nofollow">here</a>.</p>
  
  <p>I don't understand — why do <code>obj1</code> and <code>list.front()</code> still point to the same location after <code>std::move()</code> is called?</p>