I wanted to write a json file where the order in the json file is the same as the order of the member variables of my struct - so after some googling, I found nlohmann::ordered_json, and wanted to try it out. However a simple example doesn't seem to work (I'm on the latest nlohmann::json version).
My apologies if I'm just overlooking something or making some stupid mistake.
Description
Hi,
I wanted to write a json file where the order in the json file is the same as the order of the member variables of my struct - so after some googling, I found
nlohmann::ordered_json
, and wanted to try it out. However a simple example doesn't seem to work (I'm on the latest nlohmann::json version).My apologies if I'm just overlooking something or making some stupid mistake.
Reproduction steps
See code.
Expected vs. actual results
I would have expected the code to compile.
Minimal code example
Compiler and operating system
MSVC (latest) / gcc-13.2
Library version
latest
Validation
develop
branch is used.