Overwork documentation (#3444)

* 📝 overwork macro documentation

* 📝 address review comments

* 🔧 add style check to Makefile

* 🙈 overwork .gitignore

* 📌 Pygments 2.12.0 is broken

* ✏️ fix links

* 🚸 adjust output to cppcheck

* 📝 add titles to more admonitions

* ✏️ fix typos

* 📝 document future behavior change
This commit is contained in:
Niels Lohmann
2022-04-25 22:40:45 +02:00
committed by GitHub
parent fcc36f99ba
commit a6ee8bf9d9
63 changed files with 1689 additions and 366 deletions

View File

@@ -24,8 +24,8 @@ NLOHMANN_JSON_SERIALIZE_ENUM( TaskState, {
})
```
The `NLOHMANN_JSON_SERIALIZE_ENUM()` macro declares a set of `to_json()` / `from_json()` functions for type `TaskState`
while avoiding repetition and boilerplate serialization code.
The [`NLOHMANN_JSON_SERIALIZE_ENUM()` macro](../api/macros/nlohmann_json_serialize_enum.md) declares a set of
`to_json()` / `from_json()` functions for type `TaskState` while avoiding repetition and boilerplate serialization code.
## Usage
@@ -45,10 +45,11 @@ assert(jPi.get<TaskState>() == TS_INVALID );
## Notes
Just as in [Arbitrary Type Conversions](#arbitrary-types-conversions) above,
Just as in [Arbitrary Type Conversions](arbitrary_types.md) above,
- `NLOHMANN_JSON_SERIALIZE_ENUM()` MUST be declared in your enum type's namespace (which can be the global namespace),
or the library will not be able to locate it, and it will default to integer serialization.
- [`NLOHMANN_JSON_SERIALIZE_ENUM()`](../api/macros/nlohmann_json_serialize_enum.md) MUST be declared in your enum type's
namespace (which can be the global namespace), or the library will not be able to locate it, and it will default to
integer serialization.
- It MUST be available (e.g., proper headers must be included) everywhere you use the conversions.
Other Important points: