Use std::sort algorithm instead of multiset implicit sorting