C++ Logo

sg15

Advanced search

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

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Sun, 5 Oct 2025 23:45:24 +0300
On Sun, 5 Oct 2025 at 23:32, Timur Doumler via SG21
<sg21_at_[hidden]> wrote:
>
> Hi Andrzej,
>
> On 5 Oct 2025, at 21:15, Andrzej Krzemienski via SG15 <sg15_at_[hidden]> wrote:
> I do not think it should be left to implementations. I think the Standard should guarantee that if an assertion predicate is evaluated using the `enforce` mode, the preconditions of functions called in that predicate are also evaluated in `enforce` mode. But I am not sure if this is implementable.
>
>
> I don't know if it's implementable or not — implementers are encouraged to experiment — but I'm pretty sure such guarantees cannot be obtained with current tooling, so requiring a new language feature to offer those guarantees would make it dead on arrival.

What new language feature? Seems simple enough to compile predicates
so that client-side-checking is turned on while compiling a predicate.

Received on 2025-10-05 20:45:39