Is there a simple equivalent method in C++11 that will sort the contents of one array by using another as the 'keys' array? In C# the method is Array.sort(array, array) but the std::sort in C++11 does not seem to have an equivalent functionality.
I'm aware of methods such as writing your own custom sorter:
How do I sort a std::vector by the values of a different std::vector?
How can I sort two vectors in the same way, with criteria that uses only one of the vectors in C++?
But I wondered if there were existing libraries that mimicked the C# Array.sort functions?
Aucun commentaire:
Enregistrer un commentaire