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
The definition of instantiation context is as follows:
The instantiation context is a set of points within the program that determines which names are visible to argument-dependent name lookup and which declarations are reachable in the context of a particular declaration or template instantiation.
(side note: I'm pretty sure "template instantiation" should be "specialization" here)
We further go on to state:
In any other case, the instantiation context at a point within the program comprises that point.
The last bullet here seems to be inconsistent with the rest of the definition; we defined instantiation context to be relative to a declaration (or specialization), but then we specify what it is in the context of a program point.
Also, instead of "during the instantiation of [...]" we should say "in the context of [...]" as the lookup would be performed within the specialization/implicit definition.
The text was updated successfully, but these errors were encountered:
I think we intentionally refer to "template instantiation" (i.e. the act of producing a specialization), because that's a situation where name lookup happens (again). Once you have an instantiated specialization, name lookup is a thing of the past.
For the second issue, I'm not seeing it either. We say an instantiation context is a set of points, and we specify in an "otherwise" a set with a single element.
@jensmaurer For the second issue, the problem there is not what we define instantiation context as, but the context for which we define it (i.e. for a point in the program, the instantiation context is [...])
Reachability (in [module.reach]) is defined as:
A declaration D is reachable if, for any point P in the instantiation context [...]
This doesn't provide a context (i.e. the program point) from which we are "getting" the instantiation context.
The definition of instantiation context is as follows:
(side note: I'm pretty sure "template instantiation" should be "specialization" here)
We further go on to state:
The last bullet here seems to be inconsistent with the rest of the definition; we defined instantiation context to be relative to a declaration (or specialization), but then we specify what it is in the context of a program point.
Also, instead of "during the instantiation of [...]" we should say "in the context of [...]" as the lookup would be performed within the specialization/implicit definition.
The text was updated successfully, but these errors were encountered: