Documentation change (#3672)

Co-authored-by: Florian Albrechtskirchinger <falbrechtskirchinger@gmail.com>
This commit is contained in:
Niels LohmannandFlorian Albrechtskirchinger authored and GitHub committed 2022-08-05 19:51:39 +02:00
1 parent 9e1a7c85e3
commit 7b6cf5918b
65 files changed
+582 -302

No files matched your search

@@ -4,19 +4,34 @@
#define NLOHMANN_JSON_NAMESPACE
```
This macro evaluates to the full name of the `nlohmann` namespace, including
the name of a versioned and ABI-tagged inline namespace. Use this macro to
unambiguously refer to the `nlohmann` namespace.
This macro evaluates to the full name of the `nlohmann` namespace, including the name of a versioned and ABI-tagged
inline namespace. Use this macro to unambiguously refer to the `nlohmann` namespace.
## Default definition
The default value consists of a prefix, a version string, and optional ABI tags
depending on whether ABI-affecting macros are defined (e.g.,
[`JSON_DIAGNOSTICS`](json_diagnostics.md), and
The default value consists of a prefix, a version string, and optional ABI tags depending on whether ABI-affecting
macros are defined (e.g., [`JSON_DIAGNOSTICS`](json_diagnostics.md), and
[`JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON`](json_use_legacy_discarded_value_comparison.md)).
When the macro is not defined, the library will define it to its default value.
## Examples
??? example
The example shows how to use `NLOHMANN_JSON_NAMESPACE` instead of just `nlohmann`, as well as how to output the value
of `NLOHMANN_JSON_NAMESPACE`.
```cpp
--8<-- "examples/nlohmann_json_namespace.cpp"
```
Output:
```json
--8<-- "examples/nlohmann_json_namespace.output"
```
## See also
- [`NLOHMANN_JSON_NAMESPACE_BEGIN, NLOHMANN_JSON_NAMESPACE_END`](nlohmann_json_namespace_begin.md)