If this is indeed what the standard says (you are accessing the "whole object" through that char pointer, and there is no way to get to the bytes) — and I can see how you and language lawyer arrived at this interpretation of the wording, as there is indeed no char object — then frankly, I believe the standard says nonsense. This behaviour is not useful (imho), and no compiler I am aware of implements it that way.

This is a defect in the object model wording that needs fixing.

Cheers,
Timur

On 22 Aug 2019, at 14:34, sdkrystian via Std-Proposals <std-proposals@lists.isocpp.org> wrote:

Jake, you're thinking about it the wrong way. There exists no char object to bind to. None. The standard does not provide any way for you to do so. What language-lawyer and I have been writing are directly what the standard says. The standard says nothing about it binding to the first byte or any nonsense like that, it explicitly states that it will still point to the original object, no question about it, and the indirection operator will unambiguously yield the original object.

It does not matter what cppreference says, this is what the standard says. It might not be intended, but this is currently how it works.



Sent from my Samsung Galaxy smartphone.
--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals