C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Efficient and silent bounds checking with silent_at()

From: Jonathan Wakely <cxx_at_[hidden]>
Date: Thu, 6 Jul 2023 09:37:35 +0100
On Thu, 6 Jul 2023 at 05:12, Thiago Macieira via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> On Wednesday, 5 July 2023 19:41:46 PDT trtaab trtaab via Std-Proposals
> wrote:
> > The term "silent" in the context of the proposal refers to the absence of
> > additional output from the standard library, such as error messages or
> > debug information. While crashes are not inherently silent, the use of a
> > reliable crash mechanism, whether it's __builtin_trap() or other similar
> > methods, is intended to provide a controlled program termination without
> > generating extraneous output. The primary focus is on achieving a clean
> > crash without introducing additional noise or debug information.
>
> You probably need to standardise __builtin_trap() first, by making it a
> function in the std namespace that others could use too.
>
> It's too bad that C requires assert to be a macro, otherwise I'd suggest
> you
> call it std::assert. I'm sure you can find a suitable name.
>

See P2884R0: `assert` Should Be A Keyword In C++26 <
https://wg21.link/p2884r0> (by Alisdair Meredith)

Received on 2023-07-06 08:37:49