C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] [isocpp-sg21] Telecon to review P2388R1 Minimum Contract Support: either Ignore or Check_and_abort

From: Jₑₙₛ Gustedt <jens.gustedt_at_[hidden]>
Date: Mon, 27 Sep 2021 09:03:01 +0200
Ville,

on Mon, 27 Sep 2021 00:32:53 +0300 you (Ville Voutilainen via Liaison
<liaison_at_[hidden]>) wrote:

> I would encourage further work and more discussion on this.

same

> Since this "lambda" isn't callable by other parts of the program, this
> looks like something that C should be able to express, too.
> It's less consistent with the current lambda proposals in C due to
> those not having all the bells and whistles, but, oh well.

This triggers my interest ;-)

First, I think that using lambas as proposed in the draft seems really
a smart idea. This is a good step forward.

The missing thing that you are refering to is initialization of
reference/lvalue captures?

AFAICS this is only necessary for the very specific feature of naming
a return value. So this would not be in conflict with the lambda
approach for C, where I tried just to be very careful not to introduce
aliasing to existing objects. Any "capture-like" syntax that just
gives a name and type to the return value/object, even as the proposed
`&name=return` looks good to me.

Thanks
Jₑₙₛ

-- 
:: 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 2021-09-27 02:03:11