C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Standardising 0xdeadbeef for pointers

From: Andrey Semashev <andrey.semashev_at_[hidden]>
Date: Thu, 31 Jul 2025 20:40:29 +0300
On 31 Jul 2025 20:29, zxuiji via Std-Proposals wrote:
> nullptr MUST hold a value, not matter if that value is valid or not,
> therefore it will ALWAYS have pointer arithmetic available. It is utter
> insanity to say a pointer might not have pointer arithmetic.

nullptr might be a trap value, so applying any sort of math to it (or
dereference it) would cause a hardware fault.

PS: Cheetos crust, I can't believe this thread is still going..

Received on 2025-07-31 17:40:32