-
Notifications
You must be signed in to change notification settings - Fork 781
Closed
Closed
Copy link
Labels
cwgIssue must be reviewed by CWG.Issue must be reviewed by CWG.not-editorialIssue is not deemed editorial; the editorial issue is kept open for tracking.Issue is not deemed editorial; the editorial issue is kept open for tracking.
Description
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
Metadata
Metadata
Assignees
Labels
cwgIssue must be reviewed by CWG.Issue must be reviewed by CWG.not-editorialIssue is not deemed editorial; the editorial issue is kept open for tracking.Issue is not deemed editorial; the editorial issue is kept open for tracking.