C++ Logo

std-discussion

Advanced search

Re: Wording change about "base class type" in aliasing rules

From: language.lawyer_at <language.lawyer_at_[hidden]>
Date: Sat, 30 Oct 2021 00:29:00 +0300
On 29/10/2021 22:19, Lénárd Szolnoki via Std-Discussion wrote:
> Hi,
>
> https://eel.is/c++draft/expr.ref#6.2.sentence-1
>
>> If E2 is a non-static data member and the type of E1 is “cq1 vq1 X”, and the type of E2 is “cq2 vq2 T”, the expression designates the corresponding member subobject of the object designated by the first expression.
>
> As E1 doesn't refer to an object of type similar to X (there is no object of type X), this feels not defined by this. I agree that this could be explicit.
>
> This feels even more underspecified for accessing reference members.
>
> https://eel.is/c++draft/expr.ref#6.sentence-1
>
> Ok, so I know the type here, but what object does this refer to?

https://github.com/cplusplus/draft/pull/5078

Received on 2021-10-29 16:29:06