C++ Logo

sg15

Advanced search

Re: [isocpp-sg15] [isocpp-sg21] P3835 -- Different contract checking for different libraries

From: Gabriel Dos Reis <gdr_at_[hidden]>
Date: Tue, 14 Oct 2025 14:50:52 +0000
There are two assertions there that I cannot understand. Rene, could you explain further the impossibility?

-- Gaby



________________________________
From: SG15 <sg15-bounces_at_[hidden]> on behalf of René Ferdinand Rivera Morell via SG15 <sg15_at_[hidden]>
Sent: Tuesday, October 14, 2025 10:18:28 AM
To: sg15_at_[hidden]socpp.org <sg15_at_[hidden]>
Cc: René Ferdinand Rivera Morell <grafikrobot_at_[hidden]>; SG21 - Contracts <sg21_at_[hidden]>; John Spicer <jhs_at_[hidden]>
Subject: Re: [isocpp-sg15] [isocpp-sg21] P3835 -- Different contract checking for different libraries

On Tue, Oct 14, 2025 at 5:21 AM John Spicer via SG15 <sg15_at_[hidden]<mailto:sg15_at_[hidden]>> wrote:

The reason for this is that if you currently use a macro like MY_LIB_ASSERT(x), then you have control over what it does, even when your header is used by someone else.

When using a macro this "even when your header is used by someone else" is not possible. I.e. you don't actually have the control you think you have.

--
-- René Ferdinand Rivera Morell
-- Don't Assume Anything -- No Supongas Nada
-- Robot Dreams - http://robot-dreams.net<http://robot-dreams.net/>

Received on 2025-10-14 14:50:58