Skip to content

Instantly share code, notes, and snippets.

@minya
Created October 15, 2019 14:30
Show Gist options
  • Save minya/1450249cc41423e62d1ebb8d0017931a to your computer and use it in GitHub Desktop.
Save minya/1450249cc41423e62d1ebb8d0017931a to your computer and use it in GitHub Desktop.
Optional(Optional&& other) : defined(other.defined) {
if (other.defined) {
new (data) T(std::move(other.Value()));
other.defined = false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment