I am looking to copy the entire contents of a vector into a queue in C++. Is this a built in function or is it nessesary to loop over each element?
Probably the best way is to directly push elements into the queue.
std::vector v; ... std::queue q; for (const auto& e: v) q.push(e)
Even using std::copy is tedious since you have to wrap the queue in an adapter (Insert into an STL queue using std::copy).