I think you misunderstood and extrapolated what I want to every pointer.
I only want to allow the programmer to check for it with explicitly written try catch. It would help in a similar way as ranged-for does, lower the amount of code that has to be written and make it safer at the same time.
Cheers, Filip
Wiadomość napisana przez Jason McKesson via Std-Proposals <std-proposals@lists.isocpp.org> w dniu 18 lut 2025, o godz. 17:05:
On Tue, Feb 18, 2025 at 10:46 AM Filip via Std-Proposals<std-proposals@lists.isocpp.org> wrote:
What if dereferencing nullptr would not be an undefined behavior?
"What if we made every program significantly slower by requiring thecompiler to insert testing into every pointer dereference as well asexception logic?"No, thank you.-- Std-Proposals mailing listStd-Proposals@lists.isocpp.orghttps://lists.isocpp.org/mailman/listinfo.cgi/std-proposals