Yes, this is perfectly safe:
std::queue<T> q;
// add stuff...
T top = std::move(q.front());
q.pop();
pop() doesn’t have any preconditions on the first element in the q having a specified state, and since you’re not subsequently using q.front() you don’t have to deal with that object being invalidated any more.
Sounds like a good idea to do!