Created on 2025-09-22.00:00:00 last changed 2 weeks ago
Proposed resolution (approved by CWG 2025-09-26):
Change in 15.1 [cpp.pre] bullet 1.2 as follows:
- ...
- an import preprocessing token immediately followed on the same logical source line by a header-name, <, identifier,
string-literal,or : preprocessing token, or- ...
(From submission #769.)
Consider:
#define STR(X) #X
const char *str = STR(
import u8"hello"; // #1
);
Line #1 is recognized as an import directive, even though the eventual attempt to form a header-name will be IFNDR (see issue 3076). This is incongruent with the stated design goal of P1857: since a header-name is lexed right away, any string-literals that remain are necessarily invalid.
History | |||
---|---|---|---|
Date | User | Action | Args |
2025-09-26 20:51:59 | admin | set | status: open -> tentatively ready |
2025-09-22 20:37:55 | admin | set | messages: + msg8121 |
2025-09-22 00:00:00 | admin | create |