C++ Logo

std-discussion

Advanced search

Re: On "transparently replaceable" in std::vector operations

From: Hyman Rosen <hyrosen_at_[hidden]>
Date: Tue, 27 Apr 2021 14:12:01 -0400
I respectfully believe you are giving me the courtier's reply:
https://en.wikipedia.org/wiki/Courtier%27s_reply

That is, one does not need to be a tailor to proclaim that the emperor is
naked. Things like bit_cast and launder, the inscrutability of the
aliasing rules, the questions about the pointer arithmetic used to
implement vector, all show that something is very wrong with the object
model.

There's is also zero chance that a proposal to model objects as memory+type
would ever be accepted, because it would do away with many of the
permissions the current situation gives to compiler writers to optimize
code (which is also permission to disregard programmer intent).

On Tue, Apr 27, 2021, 1:20 PM Ville Voutilainen <ville.voutilainen_at_[hidden]>
wrote:

> On Tue, 27 Apr 2021 at 20:06, Hyman Rosen <hyrosen_at_[hidden]> wrote:
> >
> > This is described in https://en.wikipedia.org/wiki/Ostrich_effect
>
> I respectfully disagree; there's been no proposal to change the
> object/memory model along the lines that you
> suggest, so there's nothing that I'm burying my head in the sand about.
>

Received on 2021-04-27 13:12:17