Quick Q: How do I remove a unique_ptr from a queue? -- StackOverflow
Quick A: move(q.front()).
remove unique_ptr from queue
I'm trying to figure out how/if I can use
unique_ptrin aqueue.// create queue std::queue<std::unique_ptr<int>> q; // add element std::unique_ptr<int> p (new int{123}); q.push(std::move(p)); // try to grab the element auto p2 = foo_queue.front(); q.pop();I do understand why the code above doesn't work. Since the
front&popare 2 separate steps, the element cannot be moved. Is there a way to do this?

Andy's next on move semantics:
Roger Orr has written about the history and use of auto in ACCU's Overload 115:
The official mid-meeting standards papers mailing