mirror of
https://github.com/nlohmann/json.git
synced 2025-11-24 11:54:34 +08:00
1.1 KiB
1.1 KiB
NLOHMANN_JSON_NAMESPACE
#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.
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, and
JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON).
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
Version history
- Added in version 3.11.0.