The solution I propose covers most of the use cases (the ones it doesn't cover are for object of a type that has virtual bases or virtual functions). Unless you are doing something really sketchy, it will make a lot of existing code well defined.
Sent from my Samsung Galaxy smartphone.
... I am sure most of us remember how in the early 2000s most C++ programmers did not care whether their code had UB but were instead adhering to a sort of unofficial standard where e.g., something like dereferencing a null pointer would be illegal, but violating strict aliasing is A-OK....
-------- Original message --------
From: "Tjernstrom, Staffan via Std-Proposals" <firstname.lastname@example.org>
Date: 8/2/19 13:18 (GMT-05:00)
Cc: "Tjernstrom, Staffan" <Staffan.Tjernstrom@sig.com>
Subject: Re: [std-proposals] Allowing access to object representations
We have to maintain very large code-bases built upon this edifice. Not only do we need a solution, we need one that can be mechanically implemented.
IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
Std-Proposals mailing list