You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The header or source file identified by the parenthesized preprocessing token sequence in each contained has-include-expression is searched for as if that preprocessing token sequence were the pp-tokens in a #include directive, except that no further macro expansion is performed. If such a directive would not satisfy the syntactic requirements of a #include directive, the program is ill-formed.
Such a directive would always satisfy the syntactic requirements of a #include directive, because #include syntactically accepts pp-tokens (https://wg21.link/cpp.include#4).
Suggested resolution:
If the preprocessing token sequence does not consist solely of a header-name or cannot be combined ([cpp.include]) into a single header-name preprocessing token, the program is ill-formed.
The text was updated successfully, but these errors were encountered:
jensmaurer
changed the title
[cpp.cond] __has_include diagnosable rule re: syntax that is impossible to violate
CWG3016 [cpp.cond] __has_include diagnosable rule re: syntax that is impossible to violate
Mar 24, 2025
Full name of submitter (unless configured in github; will be published with the issue): Hubert Tong
Reference (section label): cpp.cond
Link to reflector thread (if any): N/A
Issue description:
https://wg21.link/cpp.cond#4 says:
Such a directive would always satisfy the syntactic requirements of a
#include
directive, because#include
syntactically accepts pp-tokens (https://wg21.link/cpp.include#4).Suggested resolution:
The text was updated successfully, but these errors were encountered: