-
Notifications
You must be signed in to change notification settings - Fork 773
Move the restrictions regarding macros away from [library] (or add links to them) #5321
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
Comments
This is specifying library UB. |
Sorry, could you please elaborate? My point is: why is defining a macro that is e.g. equal to a language keyword a matter for the library, rather than for the language? |
You can change the meaning of including a C++ standard library header. |
But the rule is broader than that. A TU that consists entirely of
is illegal according to that clause, isn't it? So why can't the rule be moved elsewhere? (For clarity: I'm not saying to REMOVE that paragraph; I'm asking to move it to a language-specific part, or at leats to leave links from the language-specific parts.) |
A TU is not enough. It's "C++ programs that use the facilities of the C++ standard library". |
[constraints.overview] says:
If you don't use the standard library, you can |
Got it, thank you. Just wondering: is there a formal definition of "using the standard library" somewhere? |
I don't think so. |
[macro.names] says
Nothing in there "depends" on the library, this restriction is purely a language matter. It would be nice to move that clause (or restate it, link to it, etc.) into [cpp] and/or [lex].
The text was updated successfully, but these errors were encountered: