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

Fix code to work without exceptions #2347

Merged
merged 1 commit into from
Aug 10, 2020
Merged

Fix code to work without exceptions #2347

merged 1 commit into from
Aug 10, 2020

Conversation

nlohmann
Copy link
Owner

This PR fixes a regression introduced in #2206: container ordered_map throws exceptions via throw instead of macro JSON_THROW which breaks the possibility to compile the code with -fno-exceptions. The reason this bug was not detected earlier is that we have no step in the CI that sets the flags -fno-exceptions, but only relies on the CMake flag JSON_NoExceptions. As a consequence, we added a test to compile a simple binary with -fno-exceptions set.

@nlohmann nlohmann added this to the Release 3.9.2 milestone Aug 10, 2020
@nlohmann nlohmann self-assigned this Aug 10, 2020
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 4080d0b on no_exceptions into 1b28a58 on develop.

@nlohmann nlohmann merged commit 37ce871 into develop Aug 10, 2020
@nlohmann nlohmann deleted the no_exceptions branch August 10, 2020 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Latest version 3.9.1 uses throw instead of JSON_THROW in the amalgamated json.hpp file
2 participants