C++ Logo

liaison

Advanced search

Re: [isocpp-wg14/wg21-liaison] INVITE: SG22 Telecon 2026-07-08 04:30 PM UTC

From: Joshua Berne <berne_at_[hidden]>
Date: Mon, 6 Jul 2026 11:15:28 -0400
Is there any precedent for a control macro (one defined by users to alter
the behavior of the program, not by the implementation itself) to begin
with __? Or to begin with STDC? Or any other particular form? I could
not find any other obvious examples in C or C++ other than NDEBUG whose
naming convention we hopefully don't want to use as a precedent.

Having users define a reserved name to control the behavior seems
backwards, as it mixes the responsibility of who is defining reserved names.

On Sun, Jul 5, 2026 at 3:14 AM Jₑₙₛ Gustedt <jens.gustedt_at_[hidden]> wrote:

> Joshua,
>
> on Sat, 4 Jul 2026 17:47:00 -0400 you (Joshua Berne
> <berne_at_[hidden]>) wrote:
>
> > The primary purpose of the assert() integration is to replace the
> > diagnostic output with a call to the violation handler, not to change
> > other behavior --- so I agree, explicitly calling abort() if the
> > violation handler completes (either through throwing an exception or
> > returning normally) is the right solution.
> >
> > I have updated the paper to reflect this:
> > https://isocpp.org/files/papers/D3290R5.pdf
>
> Thanks, looks good.
>
> Another thing has been comming to my mind about the name of the macro
> which you have as `ASSERT_USES_CONTRACTS`, here. I think that for C it
> would be important that this would use a reserved name, otherwise this
> feature would interact with code that already (validly) use that
> name. (Unlikely, but C is picky on these kind of questions for newly
> introduced identifiers.)
>
> So it would be better to use a `__` or `STD` prefix for that.
>
> Jₑₙₛ
>
> --
> :: ICube :::::::::::::::::::::::::::::: deputy director ::
> :: Université de Strasbourg :::::::::::::::::::::: ICPS ::
> :: INRIA antenne de Strasbourg :::::::::::::::::: Camus ::
> :: INRIA PIQ program Strasbourg :::::::::: piq.inria.fr ::
> :: :::::::::::::::::::::::::::::::::::: ☎ +33 368854536 ::
> :: https://icube-icps.unistra.fr/index.php/Jens_Gustedt ::
>

Received on 2026-07-06 15:15:45