.swap is C++11 only. Use the old, slower method of copying queues.