Commit 432a54e5 authored by Niels's avatar Niels

some type fixes

parent a3f52a5a
......@@ -3800,7 +3800,8 @@ struct hash<nlohmann::json>
inline size_t operator()(const nlohmann::json& j) const
{
// a naive hashing via the string representation
return hash<nlohmann::json::string_t>()(j.dump());
const auto& h = hash<nlohmann::json::string_t>();
return h(j.dump());
}
};
}
......@@ -3815,7 +3816,8 @@ no parse error occurred.
*/
inline nlohmann::json operator "" _json(const char* s, std::size_t)
{
return nlohmann::json::parse(s);
return nlohmann::json::parse(reinterpret_cast<nlohmann::json::string_t::value_type*>
(const_cast<char*>(s)));
}
#endif
......@@ -3149,7 +3149,8 @@ struct hash<nlohmann::json>
inline size_t operator()(const nlohmann::json& j) const
{
// a naive hashing via the string representation
return hash<nlohmann::json::string_t>()(j.dump());
const auto& h = hash<nlohmann::json::string_t>();
return h(j.dump());
}
};
}
......@@ -3164,7 +3165,8 @@ no parse error occurred.
*/
inline nlohmann::json operator "" _json(const char* s, std::size_t)
{
return nlohmann::json::parse(s);
return nlohmann::json::parse(reinterpret_cast<nlohmann::json::string_t::value_type*>
(const_cast<char*>(s)));
}
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment