Skip to content

Instantly share code, notes, and snippets.

@qrealka
Created June 26, 2019 09:50
Show Gist options
  • Save qrealka/5145659c9c92e62e9d03c7c957003850 to your computer and use it in GitHub Desktop.
Save qrealka/5145659c9c92e62e9d03c7c957003850 to your computer and use it in GitHub Desktop.
tie and minmax
std::tie(a, b) = std::minmax({a, b});
std::tie(a, b) = std::minmax(+a, +b);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment