C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] P2264/N2829 make assert() macro user friendly was adopted for C23

From: Jens Maurer <Jens.Maurer_at_[hidden]>
Date: Thu, 17 Feb 2022 17:02:31 +0100
On 17/02/2022 16.09, Peter Sommerlad (C++) via Liaison wrote:
> Hi,
>
> it would be great if the assert(...) changes proposed in P2264 could
> also be adopted for C++23 as a kind of bug fix. The C people see it
> verbally as a bug fix, because their assert() specification in the
> non-NDEBUG case was not accepting all scalar expressions as specified.
>
> How would we proceed for C++, if any?
>
> There is a very simple change, almost editorially, if C++23 is based con
> C23? Otherwise, it might be OK to wait until C++23.

C++23 is not based on C23. There is/was no paper performing a rebase.

> The wording change is as follows:
>
> In [cassert.syn] change the macro definition as follows:
>
> -#define assert( E ) see below
> +#define assert( ... ) see below
>
> The contents are the same as the C standard library header <assert.h>,
> except that a macro named static_assert is not defined.

See https://github.com/cplusplus/papers/issues/957 for the current
status of this paper.

The only new information I'm seeing here is that WG14 approved the
change. It would be good to put that into the github issue, Aaron.

Jens

Received on 2022-02-17 16:02:35