File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 312312A redeclaration of an entity $ X$
313313is implicitly exported
314314if $ X$ was introduced by an exported declaration;
315- otherwise it shall not be exported if it is attached to a named module .
315+ otherwise it shall not be exported unless it is a namespace .
316316\begin {example }
317317\begin {codeblock }
318318export module M;
319319struct S { int n; };
320320typedef S S;
321321export typedef S S; // OK, does not redeclare an entity
322322export struct S; // error: exported declaration follows non-exported declaration
323+ namespace N { // external linkage, attached to global module, not exported
324+ void f();
325+ }
326+ namespace N { // OK, exported namespace redeclaring non-exported namespace
327+ export void g();
328+ }
323329\end {codeblock }
324330\end {example }
325331
You can’t perform that action at this time.
0 commit comments