C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Return Value Optimisation whenever you need it (guaranteed elision)

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Mon, 14 Aug 2023 07:09:50 +0100
On Mon, Aug 14, 2023 at 12:11 AM Thiago Macieira via Std-Proposals wrote:
>>
> > for return Widget w = 42;
>
> for (return Widget w = 42;;);


That second one is illformed so I don't see a problem here.

Also, even if the second one were well-formed, nobody's gonna write a
'for' loop like that instead of a simple 'return' statement.

I think though Thiago you were making that the new proposed syntax
looks a little bit like an existing syntax. Am I right? I don't see
there being any ambiguity.

Received on 2023-08-14 06:10:04