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: Mon, 20 Oct 2025 18:16:11 +0300
On Mon, 20 Oct 2025 at 18:08, Joshua Berne <berne_at_[hidden]> wrote:
>> >> On Mon, 20 Oct 2025 at 16:58, Joshua Berne <berne_at_[hidden]> wrote:
>> >> > C++26 Contracts *also* let vendors provide you an option that says "don't let me link TUs when the TUs have different contract configurations" or even better options like "warn me if i link builds where the same function has been built with different contract configurations". Build configurations are outside the standard, and platforms are completely free to define when they do and don't work together, and to provide support for enforcing that rule. Nothing in C++26 Contracts prohibits this possibility.
>> >>
>> >> There's nothing in Contracts that allows for it. And then
>> >> https://eel.is/c++draft/intro.compliance#general-2.1
>> >> says "hi".
>> >
>> >
>> > You are looking for something about build flags in a standard that says nothing about build flags.
>>
>> I'm not looking for build flags. I'm looking for a rule the violation
>> of which allows an implementation to reject a mixed-mode program.
>
>
> Let me try to explain where you will and won't find rules

<clip> Thank you for telling me that a rule that allows a conforming
C++ implementation to reject a mixed-mode program does not exist.

That was what I was looking for. I do not need help in implementing
non-conforming facilities, nor do I need explanations what they are
and what that means, and few if any other vendors do.

But I can tell you as a vendor of various tools including compilers,
that not having such a rule presents tool vendors with a difficulty.
And that difficulty results in a situation where IFNDR would be preferable.

Received on 2025-10-20 15:16:26