C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] unreachable control flow

From: Miguel Ojeda <miguel.ojeda.sandonis_at_[hidden]>
Date: Mon, 17 May 2021 22:49:31 +0200
On Mon, May 17, 2021 at 9:34 PM Jens Maurer <Jens.Maurer_at_[hidden]> wrote:
>
> This feels like an additional layer on top of a basic abort().
> That additional layer might not be provided by the C standard
> itself, but by some user library, if so desired.

Indeed, it is. And I agree the UB one is the important one to
introduce. But I also think it is better to introduce both, and not
leave this kind of thing to user libraries, in order to have a common
vocabulary.

> would help here, but the basic facility "unreachable" should
> still be available regardless.

Yeah, users can do it, and I also prefer to have the basic facility
(just in case I need to create something different on top etc.), but
it is clear not everyone has the same views given other languages etc.

> The C++ contracts discussion got reset after C++20.

Not sure what you mean -- I have not said it is what C++ contracts are
doing now (I am not that involved anymore), only that I recall some
people pulling in different directions, one of those being using
contracts for optimization purposes etc.

Cheers,
Miguel

Received on 2021-05-17 15:49:44