Skip to content
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

[expr.ref] clarify access of non-static data members #3826

Merged
merged 2 commits into from Mar 7, 2020

Conversation

Kerdek
Copy link
Contributor

@Kerdek Kerdek commented Mar 6, 2020

According to the definitions, objects don't have members, and member subobjects don't have names. The standard is somewhat unclear on how the member subobjects of an object of class type relate to the non-static data members of the class. This change helps clarify that there is a member subobject associated with each non-static data member.

According to the definitions, objects don't have members, and member subobjects don't have names. The standard is somewhat unclear on how the member subobjects of an object of class type relate to the non-static data members of the class. This change helps clarify that there is a member subobject associated with each non-static data member.
@@ -3274,8 +3274,8 @@

\item If \tcode{E2} is a non-static data member and the type of
\tcode{E1} is ``\cvqual{cq1 vq1} \tcode{X}'', and the type of \tcode{E2}
is ``\cvqual{cq2 vq2} \tcode{T}'', the expression designates the named
member of the object designated by the first expression. If \tcode{E1}
is ``\cvqual{cq2 vq2} \tcode{T}'', the expression designates the associated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"corresponding" would be a better word than "associated" here, to indicate we mean the member subobject corresponding to E2.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. The relationship is a bijection, commonly called a "one-to-one correspondence". "Corresponding" is better. Changed.

@jensmaurer jensmaurer added the changes requested Changes to the wording or approach have been requested and not yet applied. label Mar 6, 2020
@jensmaurer jensmaurer removed the changes requested Changes to the wording or approach have been requested and not yet applied. label Mar 6, 2020
@zygoloid zygoloid merged commit 18788a7 into cplusplus:master Mar 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants