-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Deserializing std::map #1100
Copy link
Copy link
Closed
Labels
solution: proposed fixa fix for the issue has been proposed and waits for confirmationa fix for the issue has been proposed and waits for confirmation
Milestone
Description
Metadata
Metadata
Assignees
Labels
solution: proposed fixa fix for the issue has been proposed and waits for confirmationa fix for the issue has been proposed and waits for confirmation
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
developbranch?I'm using released version.