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 312
312
A redeclaration of an entity $ X$
313
313
is implicitly exported
314
314
if $ 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 .
316
316
\begin {example }
317
317
\begin {codeblock }
318
318
export module M;
319
319
struct S { int n; };
320
320
typedef S S;
321
321
export typedef S S; // OK, does not redeclare an entity
322
322
export 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
+ }
323
329
\end {codeblock }
324
330
\end {example }
325
331
You can’t perform that action at this time.
0 commit comments