C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Make all data pointers intercompatible

From: Jens Maurer <jens.maurer_at_[hidden]>
Date: Tue, 28 Jan 2025 12:49:48 +0100
On 28/01/2025 12.25, Frederick Virchanza Gotham via Std-Proposals wrote:
> On Tue, Jan 28, 2025 at 10:12 AM organicoman wrote:
>>
>> sizeof(void*) >= sizeof(char*)
>
>
> The logic centres of my brain are gagging right now.
>
> Why on earth would "void*" ever be any different than "char*"? I mean
> really -- use the entirety of your imagination here to pose a
> possibility to me. But a *real* *world* possibility, not some airy
> fairy 1930's supercomputer that's being repurposed by Trump's Stargate
> guys to hit the market in 2035 to overtake the quantum stuff.
>
> It should be spelled out clearly in the C++26 Standard as follows:
>
> (1) void* has identical size and representation to char*
> (2) all data pointer types are intercompatible

I still don't understand what exactly you mean by "intercompatible".

> And just as an aside . . . we have std::uintptr_t,

We do not have std::uintptr_t; P3248R2 "Require [u]intptr_t" is
still being processed.

Jens

Received on 2025-01-28 11:49:51