Hi,[Within the examples below, a blank line indicates a transition to a different translation unit.]The Modules TS [basic.def.odr] (6.2)/6.7 is supposed to implement the "module ownership rule": the same entity (or set of declarations or something) cannot be owned by multiple modules (including the global module as a module for this purpose).But... this wording was incorrectly placed in [basic.def.odr] (which is wrong because this wording is intended to apply to all declarations and [basic.def.odr] only applies to definitions). Partly as a result, it's unclear which declarations this rule *should* apply to.For example, does it apply to typedefs:using T = int;module M;using T = int;? (Is that ill-formed because T is owned by the global module and by module M? Or is it valid because... something?)And if we permit that, is that two different Ts (so any use of T is ambiguous) or a single T that resolves to 'int'?Clearly this is intended to be valid:namespace N {}module M;namespace N {}... but what about this:namespace N {}namespace N2 = N;
module M;namespace N2 = N;? (Two ambiguous N2's, a single N2, or an error?)I think it's clear that different owning modules for variables, functions, classes, enums, and templates should all be disallowed.
Just an FYI: I am not ignoring these questions. I feel they are best addressed with an explanation of the ownership model in the background, so it is turning into a paper.
There are a few places where the TS uses ‘entity’ when it should have used ‘declaration’ – I believe some of your ballot comments capture that.