jeudi 28 mai 2015

Is there a C++11 normal sort algorithm?

At time (and some may argue more often than not) it's required to sort things the way a human would sort them (alphabetically, not ASCIIbetically), yet to my knowledge there is no convenient way to do so in C++ (I'm not even aware of a boost solution), and people have to roll their own. Has this been rectified in C++11 or later?

Is there predicate or algorithm included in the c++ standard (from c++11 onwards) that allow sorting as humans would?

That is, sorting strings like "z1, z2, z3" instead of "z1, z10, z100, z2, z20, z3" etc

If not, is there some logical reason I've missed that they wouldn't include this functionality?

Aucun commentaire:

Enregistrer un commentaire