C++ Logo

std-proposals

Advanced search

Re: Initialisers in ternary operators

From: Jason McKesson <jmckesson_at_[hidden]>
Date: Sat, 12 Sep 2020 17:26:14 -0400
On Sat, Sep 12, 2020 at 12:31 PM Thiago Macieira via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> On Friday, 11 September 2020 06:28:24 PDT Richard Hodges via Std-Proposals
> wrote:
> > a) convincing everyone that the existing lambda syntax is not sufficient
>
> A return statement in a statement-expression returns from the controlling
> context; a return statement in a lambda returns only from the lambda to the
> point where it was called.

True, but there now needs to be a justification as to why having an
expression issue a return (or other control logic) is an important
thing to be able to do. Most of the reasons to have
statement-expressions boil down to macro stuff, which we ought to be
getting away from, not encouraging.

Received on 2020-09-12 16:26:26