Does [dcl.module]p2 require a diagnostic?

82 views
Skip to first unread message

Richard Smith

unread,
Oct 9, 2017, 9:03:36 PM10/9/17
to C++ Core Language Working Group, mod...@isocpp.org, Gabriel Dos Reis
Hi,

[dcl.module]p2 says: "A named module shall contain exactly one module interface unit." This suggests that a diagnostic is required. Is that the intent?

Specifically, if we're required to ensure that across the program there is exactly one module interface unit for each module, that will likely require doing something like providing a symbol from the module interface unit and using it from each other translation unit naming the module, which seems wasteful.

(We can't in general assume that all module interface units used across the whole program are transitively referenced by any specific translation unit, due to the possibility of components that register themselves via global initializers and the use of proclaimed-ownership-declarations.)
Reply all
Reply to author
Forward
0 new messages