Rewrite cpp's STL