remove unique_ptr from queue
Solution 1:
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();
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();