You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If two declarations of an entity are attached to different modules, the program is ill-formed; no diagnostic is required if neither is reachable from the other. [...] As a consequence of these rules, all declarations of an entity are attached to the same module; the entity is said to be attached to that module.
That basically seems to be saying that an entity is said to be attached to a module if it is attached to that module...
We have another definition of attachment at https://eel.is/c++draft/module.unit#7, so maybe it would be best to remove the part of [basic.link]/10 after the semicolon. If the definition in [basic.link] is trying to expand the concept from a declaration to an entity, and we think that distinction is important, it seems clearer to me to expand the wording in [module.unit] to say something like an entity is attached to whichever module the declaration that declares it is attached to.
The text was updated successfully, but these errors were encountered:
It is indeed the purpose of this paragraph to extend the attachment property from declarations to entities. That property is used in a number of places like [basic.def.odr]/15, [basic.lookup.argdep]/4.3, [basic.start.main]/3, and [dcl.inline]/7, so we probably do want to retain it. Since the rest of [basic.link] doesn't need the notion of attachment (not even for the TU-local rules), we could indeed move the definition, but we'd have to bring in the constraint as well as the definition in order for the definition to be meaningful. I don't have a strong opinion here.
@RedBeard0531 , we have "declaration attached to a module" in [module.unit] p7 and we have "entity attached to a module" in [basic.link] p10. Those are different things, nothing circular here.
https://eel.is/c++draft/basic.link#10
That basically seems to be saying that an entity is said to be attached to a module if it is attached to that module...
We have another definition of attachment at https://eel.is/c++draft/module.unit#7, so maybe it would be best to remove the part of [basic.link]/10 after the semicolon. If the definition in [basic.link] is trying to expand the concept from a declaration to an entity, and we think that distinction is important, it seems clearer to me to expand the wording in [module.unit] to say something like an entity is attached to whichever module the declaration that declares it is attached to.
The text was updated successfully, but these errors were encountered: