C++ Logo

sg15

Advanced search

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

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Sat, 4 Oct 2025 00:57:03 +0300
On Fri, 3 Oct 2025 at 01:10, Michael Spencer via SG15
<sg15_at_[hidden]> wrote:
>
> We looked at a few different papers about contracts focusing mostly on the implementability of mixing checking modes. From the github tracking:
>
> > SG15 discussed various implementation strategies for contracts with a few Itanium C++ ABI people, and a contracts implementer in the room. We had no tooling related concerns with contracts, but believe that the best ABI would require linker changes to get the best performance.
>
> We had implementers from EDG, GCC, and Clang present.
>
> From what I recall nobody had concerns that contracts is unimplementable, there was mostly discussion around how optimal the implementation could be in the presence of mixed modes. Contracts allowing multiple evaluation of checks makes a lot more implementation strategies viable. Inline functions (including template instantiations) can end up with any semantic that appeared in the program, but the standard also allows this, so that's fine.
>
> I don't recall going into detail about build systems, but I do recall discussion of how this is largely the same problem as any other benign ODR violation that build systems handle today, such as mixing language versions or exceptions on vs. off. The standard just blesses this in the right ways to not technically be an ODR violation.
>
> So to be precise I would say that nobody in the SG15 meetings where this was discussed expressed strong concerns about the implementability of contracts as specified in P2900 from a compiler or build system perspective.

I'm unaware of any concerns about contracts being about
implementability in build systems. The concerns seem to be about
having
to configure the contract semantics in the build system as opposed to
being able to do it in source code.

Received on 2025-10-03 21:57:20