Open xmh0511 opened 1 year ago
I think https://github.com/cplusplus/draft/pull/4068#pullrequestreview-442593025 may be relevant here, «bit-field» may mean unnamed bit-field declaration which is not a class member
Promote [class.mem.general-note] p2 to a normative rule is helpful here
A non-static data member of non-reference type other than an unnamed bit-field is a member subobject of a class object.
Then, we clear that bit-field is an object. When we refer to "object", we intend to mention all objects(including bit-field). If we refer to "named bit-field", we intend to mention a special object that is called bit-field.
~It's unclear to me whether unnamed bit-fields should be considered as entities. I guess that bit-field can be struck from [basic.pre] p3.~
It seems more convenient to consider unnamed bit-fieled as entities for the purpose of definition of common intial sequence ([class.mem.general] p23).
Full name of submitter (unless configured in github; will be published with the issue): Jim X
[basic.pre] p3 says
This implies object and bit-field are different entities.
However, [basic.lval] p1.1 says
Lacks the bit-field cases. A glvalue can be a bit-field in the standard.
Suggested resolution:
We might need to strip bit-field from [basic.pre] p3, and admits that a (named)bit-field is an object. Then, in every special rule, we just need to say the bit-field object