restting a queue stl

C++
// To clear the queue Q defined as "queue<int> Q"
Q = queue<int>();  
Source

Also in C++: