Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created August 19, 2017 10:02
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 deque-blog/34a790ea216b07419736ea86ecde7bca to your computer and use it in GitHub Desktop.
Save deque-blog/34a790ea216b07419736ea86ecde7bca to your computer and use it in GitHub Desktop.
// Returns false: different currencies
Money<Currency::EUR>{3} == Money<Currency::USD>{3};
// Returns true: same currency and same amount
Money<Currency::EUR>{3} == Money<Currency::EUR>{3};
// Returns false: same currency but different amount
Money<Currency::EUR>{3} == Money<Currency::EUR>{5};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment