Closed
Description
I would like to be able to be able to declare the conversion operators in a header without having to #include
the json.h file. I would then define the conversion operators in a source file, which actually includes json.h.
Here is an example of what I want do do, but can't:
namespace nlohmann {
class json;
void to_json(json &j, const MyType &blah);
void from_json(const json &j, MyType &blah);
} // namespace nlohmann
What is stopping me is using json = basic_json<>;
. A simple fix should be class json : public basic_json<> {};
.