C++ Logo

std-proposals

Advanced search

Re: Allowing access to object representations

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Wed, 21 Aug 2019 16:54:10 +0300
On Wed, 21 Aug 2019 at 16:53, Ville Voutilainen
<ville.voutilainen_at_[hidden]> wrote:
>
> On Wed, 21 Aug 2019 at 16:43, Timur Doumler <cpp_at_[hidden]> wrote:
> >
> > Yes, sure, I didn't mean that the concept of magic library functions in itself was insane. There are quite a few functions in std:: that are magic and have to be magic and that's fine.
> >
> > What I find insane is that magic is required for something as basic and simple as looking at the bytes that make up the value of an object.
>
> Indeed; we need to fix this problem, because otherwise we are leaving
> room for a lower-level language (you could presumably maybe sorta
> kinda
> implement an object representation dumper in a C library), and that's
> against the fundamental goals of C++. Writing to a representation
> is a completely different beast, as is relying on the values of
> padding bits, but just dumping the representation bits should bloody
> well
> be well-formed.

..and well-defined.

Received on 2019-08-21 08:56:24