Fix the build with nlohmann/json 3.10.4+

This commit is contained in:
regnat 2022-01-19 14:37:54 +01:00
parent bc443511eb
commit e36add56cf

View file

@ -78,7 +78,7 @@ Realisation Realisation::fromJSON(
auto fieldIterator = json.find(fieldName);
if (fieldIterator == json.end())
return std::nullopt;
return *fieldIterator;
return {*fieldIterator};
};
auto getField = [&](std::string fieldName) -> std::string {
if (auto field = getOptionalField(fieldName))