Fix NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT with an empty JSON instance#4508
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
|
@gregmarr I will update the PR according to our decision to change only this macro NLOHMANN_JSON_FROM_WITH_DEFAULT I will change only this file: include\nlohmann\detail\macro_scope.hpp should also add a test case or update a previous one? Thanks |
8045369 to
4d5b1a6
Compare
|
@NissimBendanan
|
|
|
…TRUSIVE_WITH_DEFAULT work with an empty JSON instance
4d5b1a6 to
b5cc223
Compare
🔴 Amalgamation check failed! 🔴The source code has not been amalgamated. @NissimBendanan |
|
I don't understand how to get rid of those errors. here in Amalgamation check failed! 🔴 Format (1)
|
|
Use Astyle 3.1 and run make amalgamate. |
|
I am using astyle 3.1: nbendana@tlv-wp4ww: |
|
for this failure: ci_static_analysis (ci_test_amalgamation) I run locally without error: |
🔴 Amalgamation check failed! 🔴The source code has not been amalgamated. @NissimBendanan |
|
I am working on #4573 to fix the astyle call. |
|
#4573 is merged now. Please update to the latest develop branch and try again. |
back from main
|
after updating with last version, I still have this error: Can you please explain what does this error mean? which check generate this error? how to get rid of it? |
|
You only changed the code in the |
🔴 Amalgamation check failed! 🔴The source code has not been amalgamated. @NissimBendanan |
|
so I need also to commit the change in single_include/nlohmann/json.hpp ? |
…TRUSIVE_WITH_DEFAULT work with an empty JSON instance
|
The contribution guidelines state:
I am currently revising the guidelines to make this more clear. |
|
Thanks! |
…stance (nlohmann#4508) * change NLOHMANN_JSON_FROM_WITH_DEFAULT to let NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT work with an empty JSON instance * fix ci_static_analysis_clang (ci_clang_tidy) * change NLOHMANN_JSON_FROM_WITH_DEFAULT to let NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT work with an empty JSON instance
Do not throw an exception when trying to get default value from empty json
fix the issue #4507
Pull request checklist
Read the Contribution Guidelines for detailed information.
include/nlohmanndirectory, runmake amalgamateto create the single-header filessingle_include/nlohmann/json.hppandsingle_include/nlohmann/json_fwd.hpp. The whole process is described here.Please don't
#ifdefs or other means.