A toolkit of useful functions for processing C++ STL vectors