C++ Logo

sg15

Advanced search

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

From: Harald Achitz <harald_at_[hidden]>
Date: Fri, 17 Oct 2025 13:26:09 +0200
Thanks!


So I can assume when its about hardening std, like mentioned further
above in the thread, its only about contract_assert, not using of any
pre/post ?

/Harald

On 2025-10-17 13:07, Timur Doumler via SG15 wrote:
>
>
>> On 17 Oct 2025, at 13:26, Daniela Engert via SG15
>> <sg15_at_[hidden]> wrote:
>> It is. Otherwise you'd get UB with 'observe' contract evaluation
>> semantics.
>
> See P3846R0 <https://wg21.link/p3846r0>, Concern 10 "Observing
> consecutive contract assertions is dangerous".
>
> With regards to why we allow pre and post to be evaluated multiple
> times, this is explained in quite some detail in P2899R1
> <https://wg21.link/p2899r1> Section 3.5.7. Also, Ville wrote a great
> motivation paper for this design decision a while ago that I recommend
> you check out: P3264R1 <https://wg21.link/p3264r1>.
>
> Hope this helps.
>
> Cheers,
> Timur
>
> _______________________________________________
> SG15 mailing list
> SG15_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/sg15

Received on 2025-10-17 11:26:17