``` 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)); ```
Activity
nlohmann commentedon Dec 29, 2015
Thanks for the hint! (And thanks so much for helping in so many discussions!)