Skip to content

Instantly share code, notes, and snippets.

@rightfold
Created October 23, 2015 13:28
Show Gist options
  • Save rightfold/4d79d46b7b9cdf7c8102 to your computer and use it in GitHub Desktop.
Save rightfold/4d79d46b7b9cdf7c8102 to your computer and use it in GitHub Desktop.
auto instance = try
{ some(my::Type{1, true, "hello"}); }
catch (/* error */) { none }
match (instance) {
some(instance) =>
std::cout << instance << std::endl;
return EXIT_SUCCESS;
none =>
return EXIT_FAILURE;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment