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

Handle unknown json::value_t kinds (by aborting) #1141

Merged

Conversation

johnbartholomew
Copy link
Collaborator

This should prevent a compile warning when building against nlohmann json.hpp v3.8.0 or greater, which add an extra value_t kind for binary data, without requiring a newer version to build.

Fixes #1031.

Ref #926 which was a previous attempt to fix this compiler warning, and #1023 which reverted that previous attempt.

When building with bundled JSON and bundled RapidYAML, the build works.
However, when building with system-provided JSON and bundled RapidYAML, the build
fails due to many things not being defined. It seems these are supposed to come
from the standard <charconv> header, but RapidYAML 0.5.0 release erroneously
strips that include in its single-file amalgamation. See RapidYAML issue

biojppm/rapidyaml#364 (comment)
This should prevent a compile warning when building against nlohmann json.hpp
v3.8.0 or greater, which add an extra value_t kind for binary data.
@johnbartholomew johnbartholomew force-pushed the default-case-json-value branch from 9fdc337 to 5cd4c26 Compare March 6, 2024 12:13
@johnbartholomew johnbartholomew merged commit 5cd4c26 into google:master Mar 6, 2024
6 checks passed
@johnbartholomew johnbartholomew deleted the default-case-json-value branch March 6, 2024 12:24
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.

enumeration value 'binary' not handled in switch
1 participant