-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
The code used to build with 3.10.2 but fails now #3804
Comments
Oh, I found this: #958 |
I'm sorry again, on the second thought you were going to remove the support for implicit conversions from JSON in the next major version, so I thought you might still like to look at this. |
Okay, I tried to change the code to
and I still get the error:
It seems the explicit conversion is also broken. |
Based on the discussion in #1261, it was never assumed it should work and worked only by chance?.. I need to explicitly add variant support, correct?.. |
The breaking commit was a87c188. |
I have to take a closer look to be sure, but here are my initial thoughts:
Yes, you need to provide your own
This does not change the fact that there's no conversion available. The following lines should work instead:
These calls can of course still fail at runtime, depending on the stored type. |
I understand, but the thing is that the code did build and run and work correctly with 3.10.2. |
It seems that it was a bug before to have supported an example with |
Did it break something? Because it is convenient, looks like a feature to me. |
Description
I could convert nlohmann::json to a std::variant implicitly with version 3.10.2, but with the latest version, I can't.
With the latest version, the code doesn't build.
I don't know whether it is this way for a reason (I apologize if so), or a regression.
Reproduction steps
Try to build the given code.
Expected vs. actual results
The code used to build with v3.10.2, but it doesn't with the tip of develop branch.
Minimal code example
Error messages
Compiler and operating system
Windows 10, GCC 8.3.0 for ARM
Library version
a3e6e26
Validation
develop
branch is used.The text was updated successfully, but these errors were encountered: