new c++ snippet "std::sort"