C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Relax condition for potentially invoked destructor in constructor

From: Jody Hagins <coachhagins_at_[hidden]>
Date: Fri, 25 Feb 2022 14:36:08 -0500
I'm pretty sure that quote comes from a proposed change for 2023, where they are dropping the access control recording privilege.

The same wording for 2020 is this...

(4.2) — If two pointers point to different non-static data members of the same object, or to subobjects of such members, recursively, the pointer to the later declared member is required to compare greater provided the two members have the same access control (11.9), neither member is a subobject of zero size, and their class is not a union.



> On Feb 25, 2022, at 2:14 PM, Lénárd Szolnoki via Std-Proposals <std-proposals_at_[hidden]> wrote:
>
> Hi
>
> On Fri, 25 Feb 2022 13:13:11 -0500
> Jody Hagins via Std-Proposals <std-proposals_at_[hidden]> wrote:
>
>> Arthur,
>>
>> I've learned to never disagree with you on anything, so I'd like to
>> be correctly corrected :-)
>>
>> I've always been under the understanding that reordering was only
>> granted ACROSS access control boundaries, but everything within the
>> same access boundary had a strict ordering.
>
> What's the deal with the following wording then?
>
> https://timsong-cpp.github.io/cppwp/n4861/expr.rel#4.2
>
> "If two pointers point to different non-static data members of the same
> object, or to subobjects of such members, recursively, the pointer to
> the later declared member is required to compare greater provided
> neither member is a subobject of zero size and their class is not a
> union."
>
> This pretty much specifies that data members declared later have higher
> address, regardless of access control.
>
> Cheers,
> Lénárd Szolnoki
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2022-02-25 19:36:11