Skip to content

Conversation

@languagelawyer
Copy link
Contributor

no need to mention them separately

Copy link
Member

@jensmaurer jensmaurer left a comment

Choose a reason for hiding this comment

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

Unnamed bit-fields are not members (and thus, presumably, not (sub)objects), but those cannot be the result of an expression.

@zygoloid
Copy link
Member

zygoloid commented Oct 6, 2020

Looks like a little more cleanup may be desirable: [intro.memory]p3: "A memory location is either an object of scalar type that is not a bit-field or a maximal sequence of adjacent bit-fields all having nonzero width." The note in p4 makes it completely obvious that this is the intent, so I think it's fine to fix this editorially.

While we're cleaning things up in this area, I think we can clarify [intro.object]/8.4: "has subobjects of nonzero size or unnamed bit-fields of nonzero length."

@languagelawyer
Copy link
Contributor Author

languagelawyer commented Oct 6, 2020

@zygoloid Do I understand correctly: you want to stress that unnamed bit-fields [are not|do not have corresponding] subobjects, yet they "contribute to" a memory location and affect whether a class object is of nonzero size?

no need to mention them separately
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.

3 participants