Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document which version introduced the macros #3431

Merged
merged 1 commit into from
Apr 9, 2022

Conversation

nlohmann
Copy link
Owner

@nlohmann nlohmann commented Apr 8, 2022

Closes #3429.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling e9c8d5c on issue3429_document_macro_versions into 15fa6a3 on develop.

@@ -63,6 +67,8 @@ The diagnostics messages can also be controlled with the CMake option `JSON_Diag
#define JSON_DIAGNOSTICS 0
```

The macro was introduced in version 3.10.0.

## `JSON_HAS_CPP_11`, `JSON_HAS_CPP_14`, `JSON_HAS_CPP_17`, `JSON_HAS_CPP_20`
Copy link
Contributor

@falbrechtskirchinger falbrechtskirchinger Apr 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These macros aren't user-visible. They're #undef'ed in macro_unscope.hpp. Which raises the broader question: should internal macros be documented and specifically labeled as such? Also, there's JSON_TEST_KEEP_MACROS which does mean we can "leak" some internal macros.

Food for thought for a future documentation update…

Edit: Forgot that JSON_HAS_CPP_11, etc. can be overridden by users.

@nlohmann nlohmann merged commit 1034490 into develop Apr 9, 2022
@nlohmann nlohmann deleted the issue3429_document_macro_versions branch April 9, 2022 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants