You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the issue you have?
When trying to deserialize a std::map which has a int/Enum as a key I'm getting compilation error.
Error C2166 l-value specifies const object
When i try to deserialize a std::map with a key as a string for example, it compiles fine.
Please describe the steps to reproduce the issue. Can you provide a small but working code example?
Serialize a std::map having int/enum as a key. Try to deserialize it.
If one of the map pairs (e.g., std::pair<int64_t, double>) has std::nan, it becomes a null in the written json.
If I read it back as a map, I get: [json.exception.type_error.302] type must be number, but is null.
What is the suggested approach in such a case? Should I iterate through each pair?
When trying to deserialize a std::map which has a int/Enum as a key I'm getting compilation error.
Error C2166 l-value specifies const object
When i try to deserialize a std::map with a key as a string for example, it compiles fine.
Serialize a std::map having int/enum as a key. Try to deserialize it.
json.at(_materialTypeByFaceSelectionJson).get<map<MaterialTypeEnum, FaceSelectionEnum>>();
What is the expected behavior?
It should compile.
And what is the actual behavior instead?
It doesn't.
Which compiler and operating system are you using? Is it a supported compiler?
I'm using windows 10 and Visual Studio 2017.
Did you use a released version of the library or the version from the
develop
branch?I'm using released version.
The text was updated successfully, but these errors were encountered: