Skip to content

Instantly share code, notes, and snippets.

@Thors-Anvil
Created March 28, 2018 21:36
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 Thors-Anvil/f1e9d34be3c3cefb45c292b23f10a286 to your computer and use it in GitHub Desktop.
Save Thors-Anvil/f1e9d34be3c3cefb45c292b23f10a286 to your computer and use it in GitHub Desktop.
struct alt
{
int x;
int y;
int& operator[](int index){return index == 0 ? x : y);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment