C++ Logo

std-proposals

Advanced search

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

From: Jeremy Rifkin <rifkin.jer_at_[hidden]>
Date: Sun, 3 Aug 2025 11:47:58 -0500
C++ doesn’t use annotations like this on functions

On Sun, Aug 3, 2025 at 09:48 Frederick Virchanza Gotham via Std-Proposals <
std-proposals_at_[hidden]> wrote:

>
>
> I'm going off on a tangent here, but imagine if we could mark a function
> (or lambda) as follows:
>
> int Func(double) throw_on_nullptr
> {
> . . .
> }
>
> If you try to dereference a nullptr in this function, or if you perform
> addition or subtraction on a nullptr, it throws std::nullptr_t.
>
> Maybe?
>
>
>
>
>
>> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2025-08-03 16:48:10