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

@@ -5,9 +5,8 @@
#define NLOHMANN_JSON_NAMESPACE_END // (2)
```
These macros can be used to open and close the `nlohmann` namespace. They
include an inline namespace used to differentiate symbols when linking multiple
versions (including different ABI-affecting macros) of this library.
These macros can be used to open and close the `nlohmann` namespace. They include an inline namespace used to
differentiate symbols when linking multiple versions (including different ABI-affecting macros) of this library.
1. Opens the namespace.
```cpp
@@ -25,11 +24,26 @@ versions (including different ABI-affecting macros) of this library.
## Default definition
The default definitions open and close the `nlohmann` as well as an inline
namespace.
The default definitions open and close the `nlohmann` as well as an inline namespace.
When these macros are not defined, the library will define them to their
default definitions.
When these macros are not defined, the library will define them to their default definitions.
## Examples
??? example
The example shows an example how to use `NLOHMANN_JSON_NAMESPACE_BEGIN`/`NLOHMANN_JSON_NAMESPACE_END` from the
[How do I convert third-party types?](../../features/arbitrary_types.md#how-do-i-convert-third-party-types) page.
```cpp
--8<-- "examples/nlohmann_json_namespace_begin.c++17.cpp"
```
Output:
```json
--8<-- "examples/nlohmann_json_namespace_begin.c++17.output"
```
## See also