mirror of
https://github.com/nlohmann/json.git
synced 2026-10-13 09:47:12 +00:00
deploy: 40a62947d3
This commit is contained in:
1 parent
79119509a9
commit
22fba27145
555 files changed
+17342
-1394
No files matched your search
@@ -25,13 +25,27 @@ When the macro is not defined, the library will define it to its default value.
|
||||
namespace.
|
||||
|
||||
```cpp
|
||||
--8<-- "examples/nlohmann_json_namespace_no_version.cpp"
|
||||
#include <iostream>
|
||||
|
||||
#define NLOHMANN_JSON_NAMESPACE_NO_VERSION 1
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
// macro needed to output the NLOHMANN_JSON_NAMESPACE as string literal
|
||||
#define Q(x) #x
|
||||
#define QUOTE(x) Q(x)
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << QUOTE(NLOHMANN_JSON_NAMESPACE) << std::endl;
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Output:
|
||||
|
||||
```json
|
||||
--8<-- "examples/nlohmann_json_namespace_no_version.output"
|
||||
nlohmann::json_abi
|
||||
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
Reference in new issue
Block a user