Skip to content

[cpp.module] Cannot treat module directive as normal text#8344

Closed
AlisdairM wants to merge 1 commit into
cplusplus:mainfrom
AlisdairM:no_macros_in_module_name
Closed

[cpp.module] Cannot treat module directive as normal text#8344
AlisdairM wants to merge 1 commit into
cplusplus:mainfrom
AlisdairM:no_macros_in_module_name

Conversation

@AlisdairM

Copy link
Copy Markdown
Contributor

With the application of papers restricting macros in module directives, there remain no valid transformations for treating any part of such a directive as normal text.

With the application of papers restricting macros in module directives,
there remain no valid transformations for treating any part of such a
directive as normal text.

@jensmaurer jensmaurer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is an undesirable normative change.

Note that pp-module has pp-tokens at the end (after the pp-module-partition), and those can contain macros, in particular function-like macros (and those can expand to nothing to yield a valid phase 7 "module" thing).

@AlisdairM

Copy link
Copy Markdown
Contributor Author

Withdrawn. I had missed the trailing pp-tokens in the pp-module, after the module name and module partition.

Nevertheless the sentence I tried to remove is confusing, and appears to be an oversight when wording https://wg21.link/p1853 that added a further restriction against macro expansion in the pp-module-name and pp-module-partition when scanning for module names, i.e., the text between module and the trailing pp-tokens.

I will see if I can come back with a better clarification that does not accidentally change meaning.

@AlisdairM AlisdairM closed this Oct 19, 2025
@AlisdairM AlisdairM deleted the no_macros_in_module_name branch October 25, 2025 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants