C++ Logo


Advanced search

Subject: Re: [std-proposals] Allowing access to object representations
From: Timur Doumler (cpp_at_[hidden])
Date: 2019-08-21 08:43:08

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.


> On 21 Aug 2019, at 15:37, Ville Voutilainen <ville.voutilainen_at_[hidden]> wrote:
> On Wed, 21 Aug 2019 at 16:30, Timur Doumler via Std-Proposals
> <std-proposals_at_[hidden]> wrote:
>> Hi,
>>> On 21 Aug 2019, at 15:01, sdkrystian via Std-Proposals <std-proposals_at_[hidden]> wrote:
>>> Well the implementation of a standard library function by the implementation never invokes UB: they get to break all sorts of rule. It need not even be written in C++.
>> Sure, but then it would also mean that those functions are essentially unimplementable if you are NOT a compiler vendor. Which is kind of insane imho.
> There are other functionalities in the library that require
> implementation magic, and they are certainly not insane. Whether
> memcpy et al. should be magic functions is a different
> question, and it would be great if they weren't required to be.

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

Standard Proposals Archives on Google Groups