The first template parameter is the type of the elements. The optional second template parameter
defines the container that the stack uses internally for its elements. The default container is a deque.
It was chosen because, unlike vectors, deques free their memory when elements are removed and
don’t have to copy all elements on reallocation (see Section 7.12, page 392, for a discussion of when
to use which container).
For example, the following declaration defines a stack of integers: