Last active
March 13, 2017 16:57
-
-
Save loliGothicK/d650afa179f1f5e39deb994e067c4386 to your computer and use it in GitHub Desktop.
tupleの比較の実装について
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool operator<(const Person& x, const Person& y) | |
{ | |
return (x.last_name < y.last_name) || !(y.last_name < x.last_name) | |
&& ( (x.first_name < y.first_name) || !(y.first_name < x.first_name) | |
&& (x.age < y.age )); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment