C++ Logo

sg15

Advanced search

Re: [isocpp-sg15] [isocpp-admin] Swedish mirror committee consideration on the current working draft

From: Tom Honermann <tom_at_[hidden]>
Date: Wed, 24 Sep 2025 17:48:58 -0400
On 9/24/25 10:26 AM, Ville Voutilainen via SG15 wrote:
> On Wed, 24 Sept 2025 at 17:06, Harald Achitz via SG15
> <sg15_at_[hidden]> wrote:
>> Having some interest on the build issue myself, I would be thankful to learn about the following topics:
>>
>> Will it be easily manageable to tell the linker: hey, give me libfoo with contract assertions enabled, and that is using this special contract handler? And get an error if libfoo in that flavor is not available, but only in others other configuration.
> I'm unaware of an implementation that allows you to choose the
> contract evaluation semantic at link time. There's been talk about
> that,
> but no implementation yet. And, as <see below>, you can't have
> per-library violation handlers. Except on Windows you might, which
> is yet another unanswered question in the face of lack of both
> implementation and deployment experience.
>
>> or is it only easily manageable when you build the whole source tree including dependencies with profiles / tripplets, or what ever your control file is.
> The contract evaluation semantic is chosen at compile-time. Which of
> course means it isn't always easily manageable when you don't
> (re-)compile every library you use.

Existing implementations select the contract evaluation semantic at
compile-time, but the standard does not distinguish between compile-time
or run-time selection except in the case of constant evaluation.

I agree that we lack implementation and deployment experience for
implementation strategies that delay contract evaluation semantic
selection until run-time. I remain quite interested in such strategies,
but unfortunately am not available to explore them myself. I expect that
current efforts in post-link optimization (PLO) will eventually yield a
good solution.

Tom.

Received on 2025-09-24 21:49:01