.get() throws error if used with userdefined structs in unordered_map #1448
Labels
kind: question
solution: proposed fix
a fix for the issue has been proposed and waits for confirmation
What is the issue you have?
I'm trying to save a unordered_map<int,struct> to a json and after that convert it back to the same unordred_map. Saving it works fine, the output is as expected but when i try to load the map from the given json this error is thrown : "JSON_THROW(type_error::create(304, "cannot use at() with " + std::string(type_name())));" (line 15402)."
If i simply overlooked something then im very sorry to bother.
Please describe the steps to reproduce the issue. Can you provide a small but working code example?
What is the expected behavior?
.get<>() function should return bool1 and bool2 as from__json() is defined
And what is the actual behavior instead?
Throws the error and crashes
Which compiler and operating system are you using? Is it a supported compiler?
Msvc win10 newest build
Did you use a released version of the library or the version from the
develop
branch?release version 3.5.0
The text was updated successfully, but these errors were encountered: