Does anyone know why std::queue, std::stack, and std::priority_queue don't provide a clear()
member function? I have to fake one like this:
std::queue<int> q;
// time passes...
q = std::queue<int>(); // equivalent to clear()
IIRC, clear()
is provided by everything that could serve as the underlying container. Is there a good reason to not have the container adaptors provide it?