Created on 2021-04-16.00:00:00 last changed 28 months ago
Proposed resolution, August, 2021:
Change 10.2 [module.interface] paragraph 6 as follows:
A redeclaration of an entityor typedef-nameX is implicitly exported if X was introduced by an exported declaration; otherwise it shall not be exported.
[Accepted as a DR at the October, 2021 meeting.]
According to 10.2 [module.interface] paragraph 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]
The normative text says that exporting a typedef that was not exported on its first declaration is ill-formed, but the example does so and states that it is “OK”. This is a contradiction that was introduced by the changes in paper P1787R6; the previous normative text supported the usage in the example.
(See also editorial issue 4540.)
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-08-19 07:54:33 | admin | set | status: drwp -> cd6 |
2022-02-15 00:00:00 | admin | set | status: dr -> drwp |
2021-11-15 00:00:00 | admin | set | messages: + msg6576 |
2021-04-16 00:00:00 | admin | create |