C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] Update on disposition of WG 14 N2207 / LWG 3011 re: assert macro?

From: Jens Gustedt <jens.gustedt_at_[hidden]>
Date: Mon, 12 Oct 2020 09:30:28 +0200
Hubert,

on Sat, 10 Oct 2020 10:33:21 -0400 you (Hubert Tong via Liaison
<liaison_at_[hidden]>) wrote:

> I think LWG 3011 (what conversions to bool in C++ are applied for the
> assert macro) should be fixed and I don't know where N2207 went.

You find our discussion here:

http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2239.pdf

I don't think that there has been a follow-up after that.

I think the misunderstanding in N2207 (also when discussing the
ternary operator later on) is that the expression in an `assert`
should be be considered after all implicit conversions, and the text is
indeed not clear about that.

A minimal clarification of all of that could be achieved by replacing
the "have a scalar type" to "evaluate to a scalar type". If we'd want
something in the direction of Martin's text, I would more go to "which
shall be implicitly converted to _Bool", and then strike-out the whole
explanatory ("that is ...") subphrase.


Jens

-- 
:: INRIA Nancy Grand Est ::: Camus ::::::: ICube/ICPS :::
:: ::::::::::::::: office Strasbourg : +33 368854536   ::
:: :::::::::::::::::::::: gsm France : +33 651400183   ::
:: ::::::::::::::: gsm international : +49 15737185122 ::
:: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::

Received on 2020-10-12 02:30:57