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
[dcl.type.decltype] p1 What is the entity named by E when E is a class member access #5342
Comments
Maybe it's easier to replace "the type of the entity named by E" with "the declared type of the class member named by E", which I think also resolves the problem. |
That may more directly get what type the And for class member access case, it might be more clear as the following:
"denote" is defined
|
A friendly reminder that [basic.pre]/3 is defective and should be
(Not a final state, maybe template-parameter-object should also be here and bit-field need not; class-member should be made non-static, because a static one is a variable) [dcl.type.decltype]:
Is this necessary? I think there already wording saying that if nothing is found by lookup the program is ill-formed. |
I think so. It is a bit redundant that could be regulated by name lookup. For the radical use of "variable", I think we need to first clarify what is the variable. Specifically, what is the declaration of an object or reference, see #4749 |
[dcl.type.decltype] p1.3 states:
This sentence is obscure and subtle when E is a class member access. Consider this example:
We seem to never clearly specify what the entity named by a class member access is. [basic.pre] p3 just states that:
In this case, we can say the class member access
E
names the subobject associated withC::v
or just names the class memberC::v
, they all be called entity. They have a huge different type due to the type of object expression(int
vs.int const
). It is not clear which is the correct interpretation, at least we never explicitly specify them in [expr.ref].[expr.ref] p6 just specifies that
Since [dcl.type.decltype] p1.3 references [expr.ref], we should clearly specify what the entity named by E1.E2 is, in [expr.ref].
Moreover,
denote/named/designate
should be explicitly defined if using them with the concrete component would have a different meaning.The text was updated successfully, but these errors were encountered: