mercredi 1 juillet 2015

c++ max() with intializer list returns strings out of order

max({"a", "b", "z", "x"});  returns "x"

while both

max<std::string>({"a", "b", "z", "x"});

and

max({'a', 'b', 'z', 'x'});

return "z" as they should. Any idea why?

Aucun commentaire:

Enregistrer un commentaire