Skip to content

Instantly share code, notes, and snippets.

@ga2arch
Created November 1, 2014 20:44
Show Gist options
  • Save ga2arch/02ad0a056fc77eaa37c2 to your computer and use it in GitHub Desktop.
Save ga2arch/02ad0a056fc77eaa37c2 to your computer and use it in GitHub Desktop.
struct some_tag {} op;
struct op_temporary { int lhs; };
op_temporary operator <(int lhs, some_tag rhs) {
op_temporary m;
m.lhs = lhs;
return m;
}
int operator >(op_temporary lhs, int rhs) {
return lhs.lhs + rhs;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment