Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try a packed optional #6

Open
arBmind opened this issue May 26, 2019 · 0 comments
Open

Try a packed optional #6

arBmind opened this issue May 26, 2019 · 0 comments

Comments

@arBmind
Copy link
Member

arBmind commented May 26, 2019

the ok() and error() methods return an std::optional<std::reference_wrapper<>>. The reference wrapper is basically a pointer that can be used like a reference. This means there is already a way to encode a not valid-state.

This is basically the idea of a packed optional.

We should try this and check if this would really help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant