This example code is explained in the STXXL Sequence section.
#include <iostream>
int main()
{
sequence_type my_sequence;
for (int i = 0; i < 100; ++i)
{
}
sequence_type::stream forward_stream = my_sequence.get_stream();
while (!forward_stream.empty())
{
std::cout << *forward_stream << " ";
my_sequence.pop_back();
++forward_stream;
}
return 0;
}