Re: ({

Liste des GroupesRevenir à cl c++ 
Sujet : Re: ({
De : acm (at) *nospam* muc.de (Alan Mackenzie)
Groupes : comp.lang.c++
Date : 22. Mar 2025, 12:00:34
Autres entêtes
Organisation : muc.de e.V.
Message-ID : <vrm58i$2ue$2@news.muc.de>
References : 1 2 3
User-Agent : tin/2.6.4-20241224 ("Helmsdale") (FreeBSD/14.2-RELEASE-p1 (amd64))
Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
Paavo Helde <eesnimi@osa.pri.ee> writes:
[...]
It appears the statement expressions are a gcc extension which does
not even compile in standard C++, and is probably not needed for
anything in C++ as there are better options like templated and inlined
functions.
In C there might be some usage case for it.
[...]

Statement expressions don't compile in *standard* C or C++.

More precisely, they're not standard C or C++.  I think it is a shame
they never became part of the standard, as no doubt their developers
intended.

gcc supports them as an extension for both C and C++ (and Objective-C).

There are instances of statement expressions in the Linux kernel,
developed under GCC, and clang was enhanced to support them too so as to
be able to compile Linux.  Or so I've heard.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

--
Alan Mackenzie (Nuremberg, Germany).


Date Sujet#  Auteur
20 Mar 25 * ({13Alan Mackenzie
21 Mar 25 +* Re: ({2Bonita Montero
22 Mar 25 i`- Re: ({1Bonita Montero
21 Mar 25 `* Re: ({10Paavo Helde
21 Mar 25  +* Re: ({4Keith Thompson
22 Mar 25  i+* Re: ({2Bonita Montero
22 Mar 25  ii`- Re: ({1Alan Mackenzie
22 Mar 25  i`- Re: ({1Alan Mackenzie
22 Mar 25  +* Re: ({4Alan Mackenzie
22 Mar 25  i+* Re: ({2Paavo Helde
22 Mar 25  ii`- Re: ({1David Brown
22 Mar 25  i`- Re: ({1Alan Mackenzie
1 Apr 25  `- Re: ({1Jakob Bohm

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal