C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] [isocpp-sg21] Telecon to review P2388R1 Minimum Contract Support: either Ignore or Check_and_abort

From: Miguel Ojeda <miguel.ojeda.sandonis_at_[hidden]>
Date: Thu, 23 Sep 2021 11:51:41 +0200
On Wed, Sep 22, 2021 at 8:31 PM Jā‚‘ā‚™ā‚› Gustedt via SG21
<sg21_at_[hidden]> wrote:
>
> That is done with proper syntax using a keyword in C.
>
> And, IIRC what I've read, that's one of the reasons introducing
> attributes to C failed at the first attempt for C11. And also, this
> seems to be why other languages integrate such a property in the type
> system.

Indeed -- e.g. Rust provides a `!` type for that.

In fact, in the example above, returning an `int` does not make sense
for a `[[noreturn]]` function.

Cheers,
Miguel

Received on 2021-09-23 04:51:53