-
-
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
map<json::value_t, string> exhibits unexpected behavior #1387
Comments
map<json::value_t, string>
exhibits unexpected behavior
The issue incidentally does seem to go away when using I have a feeling the issue is due to this portion of the code
Correcting the values here makes the error/issue go away. EDIT Nope I think my pull request will not work. This is because float, integer and unsigned have the same priority value 2. For example, if we were to change the order/location of the place where float was written, integer starts issuing the value float
My fix involved keeping the priority order same as that which was present above while declaration. |
Thanks for the tip. I ended up writing a different workaround:
|
Is there anything left to do from my side? |
That's okay. Maybe want to update the documentation somewhere to mention that |
Note there is also a member function |
And there are the |
Yeah, I ended up using |
What is the issue you have?
map<json::value_t, string>
exhibits unexpected behaviorPlease describe the steps to reproduce the issue. Can you provide a small but working code example?
What is the expected behavior?
"number"
And what is the actual behavior instead?
"integer"
Which compiler and operating system are you using? Is it a supported compiler?
gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
Ubuntu 18.04
Did you use a released version of the library or the version from the
develop
branch?Tried various official released as well as the latest on master
If you experience a compilation error: can you compile and run the unit tests?
n/a
The text was updated successfully, but these errors were encountered: