Skip to content

Instantly share code, notes, and snippets.

@NlightNFotis
Forked from njlr/naive-either.cpp
Created March 19, 2018 14:53
Show Gist options
  • Save NlightNFotis/d3fe3e5dc30ae9fe9bb8b3a6a905c824 to your computer and use it in GitHub Desktop.
Save NlightNFotis/d3fe3e5dc30ae9fe9bb8b3a6a905c824 to your computer and use it in GitHub Desktop.
template<class Left, class Right>
struct Either {
union {
Left leftValue;
Right rightValue;
};
bool isLeft;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment