-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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 for #1647 #1821
Fix for #1647 #1821
Conversation
Note that (as discussed in #1647) this compile error is compiler-specific. It does not happen with e.g. Clang 10.0.0. I'm not actually sure why, I'm thinking GCC is correct here by failing to compile. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a comment.
Moved the test. Not sure what's up with the failure in Travis. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Thanks! |
🔖 Release itemThis issue/PR will be part of the next release of the library. This template helps preparing the release notes. Type
Description
|
Awesome! |
This fixed #1647, which discusses a compile error when an enum is deserialized and a user-defined struct has a "non default constructible" from_json function defined for it.
The issue was a template instantiation with a
const
-qualifier on the type. This pull request simply removes that qualifier.I have extended the existing enum conversion test by adding a class in an anonymous namespace. For this class a "non default constructable" from_json function is defined. The "enum" test iteself did not need to be updated. I verified that the tests no longer compiled after the addition of the new class, and did once again compile after the change in
json.hpp
.