Date: Tue, 14 Oct 2025 16:39:44 -0400
On 10/14/25 4:10 PM, Ville Voutilainen via SG21 wrote:
> On Tue, 14 Oct 2025 at 23:02, Tom Honermann <tom_at_[hidden]> wrote:
>> Gettting warmer, yes. There's also a concern which of these things
>> should be the default.
>>
>> Are you unhappy with [intro.compliance.general]p8?
>>
>> It is implementation-defined whether the implementation is a hardened implementation. If it is a hardened implementation, violating a hardened precondition results in a contract violation ([structure.specifications]).
> That has nothing to do with what form of contract declarations is the
> default. And while I'm not completely unhappy as such with that
> particular part of the specification,
I'm of the opinion that it would be strange for contracts to have a
different default than standard library hardening enablement. But that
is a subjective perspective.
> I am very unhappy with the part of the library specification that then
> allows 'observe' for a hardened implementation, and the paper I wrote
> proposes to change
> that wording.
I would be very unhappy if any implementation made observe the default.
But I find observe useful and see no reason to prohibit implementations
from offering it. The only difference I would expect to see from
prohibiting observe in the standard is implementations issuing a
congratulatory diagnostic to users that explicitly opted in to use of
that semantic.
Tom.
> _______________________________________________
> 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/11279.php
> On Tue, 14 Oct 2025 at 23:02, Tom Honermann <tom_at_[hidden]> wrote:
>> Gettting warmer, yes. There's also a concern which of these things
>> should be the default.
>>
>> Are you unhappy with [intro.compliance.general]p8?
>>
>> It is implementation-defined whether the implementation is a hardened implementation. If it is a hardened implementation, violating a hardened precondition results in a contract violation ([structure.specifications]).
> That has nothing to do with what form of contract declarations is the
> default. And while I'm not completely unhappy as such with that
> particular part of the specification,
I'm of the opinion that it would be strange for contracts to have a
different default than standard library hardening enablement. But that
is a subjective perspective.
> I am very unhappy with the part of the library specification that then
> allows 'observe' for a hardened implementation, and the paper I wrote
> proposes to change
> that wording.
I would be very unhappy if any implementation made observe the default.
But I find observe useful and see no reason to prohibit implementations
from offering it. The only difference I would expect to see from
prohibiting observe in the standard is implementations issuing a
congratulatory diagnostic to users that explicitly opted in to use of
that semantic.
Tom.
> _______________________________________________
> 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/11279.php
Received on 2025-10-14 20:39:51
