This example code is explained in the STXXL Stack section
int main()
{
stack_type my_stack;
my_stack.push(8);
my_stack.push(7);
my_stack.push(4);
assert(my_stack.size() == 3);
assert(my_stack.top() == 4);
my_stack.pop();
assert(my_stack.top() == 7);
my_stack.pop();
assert(my_stack.top() == 8);
my_stack.pop();
assert(my_stack.empty());
return 0;
}