C++ Logo

sg15

Advanced search

Re: [isocpp-sg15] [isocpp-sg21] P3835 -- Different contract checking for different libraries

From: Timur Doumler <cpp_at_[hidden]>
Date: Tue, 21 Oct 2025 09:37:54 +0200
OK, but if you wrote a buggy assertion and that crashes your code, then you go and fix that assertion. I don't see how a contract-checking facility could plausibly protect you from that.

Timur

> On 21 Oct 2025, at 09:33, Ville Voutilainen <ville.voutilainen_at_[hidden]> wrote:
>
> On Tue, 21 Oct 2025 at 09:07, Timur Doumler <cpp_at_[hidden]> wrote:
>
>> Remember that the *worst* case that can occur with P2900 mixed-mode is that an assertion you intended to be checked in TU1 but has been compiled with "ignore" in TU2 will also be ignored in TU1
>
> It seems to me that it's rather plausible that a worse case than that
> is having a buggy assertion that is intended to be ignored or observed
> in TU1,
> but has been compiled with 'enforce' in TU2 and then crashes the code
> we're trying to run to completion in TU1.

Received on 2025-10-21 07:38:00