Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of assuming, should we
#errorif_YVALS_CORE_H_isn't defined? I'm inclined to not check, since (1) as you say elsewhere no user should ever include this and there's no reason to include from elsewhere in the STL, and (2) if someone does somehow manage to include this beforeyvals_core.hthe effect will simply be to disable the contents (_STL_COMPILER_PREPROCESSORwon't be defined). There's no danger of silent bad codegen.The flip side of this coin is, if this file is only supposed to be included from one place ever, why not inline its contents and delete this file instead of forcing the preprocessor to inline it into
yvals_core.hon every compile?(This is an "approve with suggestions" comment: it's worth discussion, but I certainly won't be bothered if we merge this as is.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same. I would add (3) this wouldn't enforce the particular ordering we care about (early enough to protect most of
yvals_core.hfrom macros, but after the definitions of_STL_COMPILER_PREPROCESSORand_HAS_CXXmeow).We could do that (as we recently did for
<cmath>), butxkeycheck.his rather large (almost 600 lines, 20 KB) and extremely boring (it should do nothing for builds that aren't doomed);yvals_core.his already big enough (almost 1400 lines, 67 KB) and contains lots of important stuff.What I really want is for the compilers to reward keyword macros with doom.