C++ Logo

liaison

Advanced search

Re: [isocpp-wg14/wg21-liaison] WG21 feedback required - N3538

From: Jₑₙₛ Gustedt <jens.gustedt_at_[hidden]>
Date: Mon, 5 May 2025 18:24:44 +0200
Hi

on Mon, 5 May 2025 14:02:47 +0000 you ("Herring, Davis via Liaison"
<liaison_at_[hidden]>) wrote:

> > The author would appreciate WG21 feedback. I encourage you to take
> > a moment to read the paper and share your thoughts.
>
> void does not disqualify C++ expressions from being constants and
> seems patently superior to using + to join an assertion to an
> integer.

> Can't C make "void(1), 1" be a constant expression too?

Not so easily, as can't C++, I think, because "constant expression"
is "conditional expression" with additional semantics. And the later
excludes the comma operator by definition. What the historical reason
for this would be, I don't know, and if would be easy to change I
don't know either.

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 2025-05-05 16:24:49