-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prefer specific feature test macros (#358)
Rather than testing for the entire C++ standard revision using `__cplusplus`, use specific feature test macros for testing the presence of the particular features being used. Testing the entire C++ standard revision is insufficient, as toolchains may implement and enable features incrementally during implementation of the next revision. A toolchain could feasibly implement three-way comparisons but have not yet incremented `__cplusplus` as other features remain unimplemented. [^1] I also believe this approach to be somewhat more self-describing, which is appealing even in the face of its verbosity/clunkiness. [^1]: https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations#explanation-and-rationale-for-the-approach
- Loading branch information
1 parent
13a7ab9
commit 48d55b3
Showing
3 changed files
with
2 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters