Why does std::queue use std::dequeue as underlying default container?
问题 As read on cplusplus.com, std::queue is implemented as follows: queues are implemented as containers adaptors, which are classes that use an encapsulated object of a specific container class as its underlying container, providing a specific set of member functions to access its elements. Elements are pushed into the "back" of the specific container and popped from its "front". The underlying container may be one of the standard container class template or some other specifically designed