C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] Allowing access to object representations
From: Ville Voutilainen (ville.voutilainen_at_[hidden])
Date: 2019-08-21 08:54:10


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_timur.audio> 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.


STD-PROPOSALS list run by herb.sutter at gmail.com

Standard Proposals Archives on Google Groups