mirror of
https://github.com/nlohmann/json.git
synced 2026-03-01 23:06:27 +00:00
minor change to make code more portable
This commit is contained in:
@@ -3800,7 +3800,7 @@ struct hash<nlohmann::json>
|
||||
inline size_t operator()(const nlohmann::json& j) const
|
||||
{
|
||||
// a naive hashing via the string representation
|
||||
return hash<std::string>()(j.dump());
|
||||
return hash<nlohmann::json::string_t>()(j.dump());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3149,7 +3149,7 @@ struct hash<nlohmann::json>
|
||||
inline size_t operator()(const nlohmann::json& j) const
|
||||
{
|
||||
// a naive hashing via the string representation
|
||||
return hash<std::string>()(j.dump());
|
||||
return hash<nlohmann::json::string_t>()(j.dump());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user