Skip to content
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

[module.interface] Example does not seem to match normative wording CWG2491 #4540

Closed
cpplearner opened this issue Mar 7, 2021 · 5 comments · Fixed by #5030
Closed

[module.interface] Example does not seem to match normative wording CWG2491 #4540

cpplearner opened this issue Mar 7, 2021 · 5 comments · Fixed by #5030
Labels
cwg Issue must be reviewed by CWG. not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking.

Comments

@cpplearner
Copy link
Contributor

cpplearner commented Mar 7, 2021

[module.interface]/6:

A redeclaration of an entity or typedef-name X is implicitly exported if X was introduced by an exported declaration; otherwise it shall not be exported.

[Example 4:

export module M;
struct S { int n; };
typedef S S;
export typedef S S;             // OK, does not redeclare an entity
export struct S;                // error: exported declaration follows non-exported declaration

— end example]

In the example, export typedef S S; redeclares a typedef-name whose preceding declaration was not exported. The normative wording seems to say that it's not OK, but the example says it is.

I guess the example needs to be updated.

The "or typedef-name" part of the normative wording was added by P1787R6.

cc @opensdh

@opensdh
Copy link
Contributor

opensdh commented Mar 8, 2021

I don't have much special to add here; neither the minutes (from June 8) nor my contemporaneous notes say anything about the change. I suppose it might have had to do with typedef names for linkage purposes:

typedef struct {} X;
export typedef X X;

@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Mar 26, 2021
@jensmaurer jensmaurer removed the decision-required A decision of the editorial group (or the Project Editor) is required. label Apr 16, 2021
@jensmaurer
Copy link
Member

Editorial meeting 2021-04-16: Forward to CWG.

@jensmaurer jensmaurer added cwg Issue must be reviewed by CWG. not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking. and removed not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking. labels Apr 16, 2021
@zygoloid
Copy link
Member

I've requested that a core issue be opened for this.

@opensdh
Copy link
Contributor

opensdh commented Jun 29, 2022

Was a core issue ever opened here?

@jensmaurer
Copy link
Member

jensmaurer commented Jun 29, 2022

CWG2491, which struck "or typedef-name".
Applied Oct 2021.

@jensmaurer jensmaurer changed the title [module.interface] Example does not seem to match normative wording [module.interface] Example does not seem to match normative wording CWG2491 Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cwg Issue must be reviewed by CWG. not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants