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

Allow taking optional by value in function arguments #950

Closed

Conversation

Walter-Reactor
Copy link

This appears to be a bug, or perhaps just an oversight?

@wjakob
Copy link
Owner

wjakob commented Feb 27, 2025

See issue #951. The fact that .none() has to be specified is indeed somewhat redundant, but is a consequence of the design of this library. I don't see a way of fixing this without adding quite a bit of complexity and/or adding runtime cost.

@wjakob wjakob closed this Feb 27, 2025
@Walter-Reactor
Copy link
Author

Gotcha. Would it be possible to note this in the documentation, or at least in a comment in the stl/option.h header?

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

Successfully merging this pull request may close these issues.

2 participants