Date: Fri, 17 Oct 2025 13:36:42 +0200
About concern 10 (aka ES-047), please note that saying we discussed this
before does not solve the problem.
We have a problem. It is a problem for language teachability. It leads to
UB. Mitigations are just workarounds. There is no solution to that problem
at this point.
That might be acceptable for a white-paper or a Technical Specification.
In my humble opinion, this is not acceptable for an International Standard.
On Fri, Oct 17, 2025 at 1:07 PM Timur Doumler via SG21 <
sg21_at_[hidden]> 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
> _______________________________________________
> SG21 mailing list
> SG21_at_[hidden]
> Subscription: https://lists.isocpp.org/mailman/listinfo.cgi/sg21
> Link to this post: http://lists.isocpp.org/sg21/2025/10/11326.php
>
before does not solve the problem.
We have a problem. It is a problem for language teachability. It leads to
UB. Mitigations are just workarounds. There is no solution to that problem
at this point.
That might be acceptable for a white-paper or a Technical Specification.
In my humble opinion, this is not acceptable for an International Standard.
On Fri, Oct 17, 2025 at 1:07 PM Timur Doumler via SG21 <
sg21_at_[hidden]> 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
> _______________________________________________
> SG21 mailing list
> SG21_at_[hidden]
> Subscription: https://lists.isocpp.org/mailman/listinfo.cgi/sg21
> Link to this post: http://lists.isocpp.org/sg21/2025/10/11326.php
>
Received on 2025-10-17 11:37:22
