Is std::pair<int, std::string> ordering well-defined?

Posted by Adal on Stack Overflow See other posts from Stack Overflow or by Adal
Published on 2010-05-12T13:35:23Z Indexed on 2010/05/12 13:44 UTC
Read the original article Hit count: 260

Filed under:
|
|
|

It seems that I can sort an std::vector<std::pair<int, std::string>>, and it will sort based on the int value. Is this a well defined thing to do? Does std::pair have a default ordering based on it's elements?

© Stack Overflow or respective owner

Related posts about c++

Related posts about stl