Standard C++ Library Class Reference
Allocator
allocator_type get_allocator () const;
Returns a copy of the allocator used by self for storage management.
Member Functions
bool
empty () const;
Returns true if the stack is empty, otherwise false.
void
pop ();
Removes the item at the top of the stack.
void
push (const value_type& x);
Pushes x onto the stack.
size_type
size () const;
Returns the number of elements on the stack.
value_type&
top ();
Returns a reference to the item at the top of the stack. This will be the last item pushed
onto the stack unless pop() has been called since then.
const value_type&
top () const;
Returns a constant reference to the item at the top of the stack as a const value_type.
Non-member Operators
template <class T, class Container, class Allocator>
bool operator== (const stack<T, Container, Allocator>& x,
const stack<T, Container, Allocator>& y);
Equality operator. Returns true if x is the same as y.
template <class T, class Container, class Allocator>
bool operator< (const stack<T, Container, Allocator>& x,
const stack<T, Container, Allocator>& y);
Returns true if the stack defined by the elements contained in x is lexicographically less