We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inline nlohmann::json operator "" _json(const char* s, std::size_t) { return nlohmann::json::parse(reinterpret_cast<nlohmann::json::string_t::value_type*> (const_cast<char*>(s))); }
The const_cast<char *>() can be removed simply by adding const to the reinterpret_cast.
return nlohmann::json::parse(reinterpret_cast<const nlohmann::json::string_t::value_type*>(s));
The text was updated successfully, but these errors were encountered:
Thanks for the hint! (And thanks so much for helping in so many discussions!)
Sorry, something went wrong.
3905406
nlohmann
No branches or pull requests
The const_cast<char *>() can be removed simply by adding const to the reinterpret_cast.
The text was updated successfully, but these errors were encountered: