What is the issue you have?
In the 3.9.1 release, the amalgamated header (json.hpp), contains 2 throw statements
This causes compilation with the -fno-exceptions flag to fail.
Replacing these throw calls with JSON_THROW solves the issue.
I tried to fix the issue and create a pull request. However I couldn't find where these 2 lines are generated in the source code.
Please describe the steps to reproduce the issue.
- Include json.hpp in a C++ source file (simple main that includes the header, and create a json instance is enough)
- Compile the source file (using gcc or clang) with -fno-exceptions
3 Compilation fails because of the throw statements
- Replace throw statements with JSON_THROW
- Compilation passes
Can you provide a small but working code example?
See above
What is the expected behavior?
Compiling with -fno-exceptions should pass
And what is the actual behavior instead?
Compilation with -fno-exceptions fails
Which compiler and operating system are you using?
- Operating system: Ubuntu 20.04
- Compiler: clang 10.0.0
- Compiler: gcc 9.3.0
Which version of the library did you use?
3.9.1
Did not check unit tests.
What is the issue you have?
In the 3.9.1 release, the amalgamated header (json.hpp), contains 2 throw statements
This causes compilation with the -fno-exceptions flag to fail.
Replacing these throw calls with JSON_THROW solves the issue.
I tried to fix the issue and create a pull request. However I couldn't find where these 2 lines are generated in the source code.
Please describe the steps to reproduce the issue.
3 Compilation fails because of the throw statements
Can you provide a small but working code example?
See above
What is the expected behavior?
Compiling with -fno-exceptions should pass
And what is the actual behavior instead?
Compilation with -fno-exceptions fails
Which compiler and operating system are you using?
Which version of the library did you use?
3.9.1
developbranchIf you experience a compilation error: can you compile and run the unit tests?
Did not check unit tests.