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 use of std::optional for optional arguments #108

Closed
wants to merge 1 commit into from

Conversation

jonesmz
Copy link

@jonesmz jonesmz commented May 31, 2021

This is in addition to supporting boost::optional.

This is in addition to supporting boost::optional.
@sjoubert
Copy link
Contributor

sjoubert commented Mar 5, 2024

Any update on merging this? This would be really nice to avoid having to convert boost::optional to std::optional after parsing.

@vprus
Copy link
Collaborator

vprus commented Mar 5, 2024

Does this PR even work? It refers to std::optional without ever including <optional>.

Ideally, both include of the header and this new definition should be conditional on the compiler supporting C++17. Are you willing to make such changes?

@sjoubert
Copy link
Contributor

sjoubert commented Mar 5, 2024

I quickly tested this and it seems to work. But yes, I might have some time to put into this. What should I check?

  • Conditional include and use of std::optional
  • Adding some tests I assume?
  • I don't think I can replace the current branch/PR, should I create a new one?

@vprus
Copy link
Collaborator

vprus commented Mar 5, 2024

Yeah, I think you need a new branch/PR. For tests, they will be appreciated, but it's up to you.

@jonesmz
Copy link
Author

jonesmz commented Mar 5, 2024

the PR was pulled straight out of my work codebase's copy of boost. Used in production for over 5 years.

Feel free to adjust the PR directly, or to use an alternative PR written by someone else.

@vprus
Copy link
Collaborator

vprus commented Mar 5, 2024

Folks,
thanks for your interest and contribution; this is now merged in #132.

@vprus vprus closed this Mar 5, 2024
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.

3 participants