Skip to content

Instantly share code, notes, and snippets.

@loliGothicK
Last active March 13, 2017 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loliGothicK/d650afa179f1f5e39deb994e067c4386 to your computer and use it in GitHub Desktop.
Save loliGothicK/d650afa179f1f5e39deb994e067c4386 to your computer and use it in GitHub Desktop.
tupleの比較の実装について
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