New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[basic.lookup.unqual] p5 The component names of a type-specifier or ptr-operator are underspecified #5221
Comments
@opensdh, it seems reasonable to define component names of type-specifier and ptr-operator by explicit recursive decomposition. What do you think? |
I wrote down to address this in P2449. In general, I don't think it's all that important, since "a component name of a type-specifier" isn't all that different from "a component name of a thing (which is a simple-type-specifier, elaborated-type-specifier, or typename-specifier) that is a type-specifier". More problematic would be if we defined the component names of a type-specifier and then made use of the component names of (say) a typename-specifier in a context where it was not interpreted as a type-specifier. That said, the ptr-operator case is a little more serious, since we have to read it as "a component name contained by a ptr-operator" and then we have to worry about how directly it is contained. |
Of course, upon rechecking I see that P1787R6 already specified the component names for a ptr-operator! |
Anyway, the terminal name of a The basic logic in this issue is a higher-level syntax is a superset of a lower-level syntax, so any properties of the lower-level syntax can be included by the higher-level one but not vice versa. In the first rule, we say the component name of a type-specifier that is a higher-level syntax than anyone in the list, so we should explicitly say what the properties(i.e. component names) of the higher-level syntax are. |
The component names of a type-specifier is not explicitly specified in subclause [dcl.type.general]. As well, the component names of a ptr-operator is not specified in subclause [dcl.decl.general].
The component names of the first three components are specified in their respective subclauses. However, a type-specifier can be a simple-type-specifier or any other component in the list, but we cannot conversely say any component in the list is called type-specifier. So, we should explicitly specify what component names of a type-specifier are.
As well,
we can say a ptr-operator is any component in the list but not the other way around. So, we should explicitly specify what component names of a ptr-operator are.
The text was updated successfully, but these errors were encountered: