Replace fwd decl of json with wrapper type#11196
Replace fwd decl of json with wrapper type#11196hahnjo wants to merge 1 commit intoroot-project:masterfrom
Conversation
Since nlohmann/json#3590, the basic_json class and the json using-declaration are located in a "versioned, ABI-tagged inline namespace". This makes it impossible to forward declare the type in REveElement.hxx. Instead introduce a new struct REveJsonWrapper that just wraps a json object (after including the full nlohmann/json.hpp). As the struct is under our control, we can easily forward declare the type and use it for method arguments. Fixes root-project#11130
|
Starting build on |
|
Two issues with this approach:
|
|
Problem is not only eve7 - where derived classes used in examples. nlohmann/json used in TBufferJSON and planned for usage with TJSONFile. Idea to wait for llvm13 where one fully can avoid forward declarations and use directly |
|
@linev no, usage of |
|
Not the right approach as we might want to have APIs that take |
Since nlohmann/json#3590, the
basic_jsonclass and thejsonusing-declaration are located in a "versioned, ABI-tagged inline namespace". This makes it impossible to forward declare the type inREveElement.hxx.Instead introduce a new struct
REveJsonWrapperthat just wraps ajsonobject (after including the fullnlohmann/json.hpp). As thestructis under our control, we can easily forward declare the type and use it for method arguments.Fixes #11130