I\'m trying to figure out how/if I can use unique_ptr in a queue.
unique_ptr
queue
// create queue std::queue> q;
You should say explicitly that you want to move the pointer out of the queue. Like this:
std::unique_ptr<int> p2 = std::move(q.front()); q.pop();