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

value_to supports missing elements for std::optional #807

Merged

Conversation

grisumbras
Copy link
Member

No description provided.

@grisumbras grisumbras force-pushed the feature/missing-member-optional branch from 595d7b1 to f0611aa Compare November 16, 2022 12:42
@cppalliance-bot
Copy link

@grisumbras grisumbras force-pushed the feature/missing-member-optional branch from f0611aa to 8f7e7c8 Compare November 16, 2022 18:59
@cppalliance-bot
Copy link

@klemens-morgenstern
Copy link

I could also use this with boost::optional - here's my use-case

https://github.com/klemens-morgenstern/requests/blob/develop/example/github-issues.hpp#L94

It's quite common in APIs, that null and non-existant are functionally the same.

I guess one could use a optional<variant<monostate, T>> if those two cases have to be distinguished.

@grisumbras
Copy link
Member Author

We probably need a special category for nullable types

@grisumbras grisumbras force-pushed the feature/missing-member-optional branch from 8f7e7c8 to 8659e7d Compare January 2, 2023 11:09
@codecov
Copy link

codecov bot commented Jan 2, 2023

Codecov Report

Merging #807 (8659e7d) into develop (a210032) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #807   +/-   ##
========================================
  Coverage    99.01%   99.01%           
========================================
  Files           70       70           
  Lines         6883     6883           
========================================
  Hits          6815     6815           
  Misses          68       68           
Impacted Files Coverage Δ
include/boost/json/detail/value_to.hpp 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a210032...8659e7d. Read the comment docs.

@grisumbras grisumbras merged commit 8659e7d into boostorg:develop Jan 2, 2023
@grisumbras grisumbras deleted the feature/missing-member-optional branch January 2, 2023 11:38
@cppalliance-bot
Copy link

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.

None yet

3 participants