C++ Logo

std-proposals

Advanced search

Re: [std-proposals] return value lives until end of scope

From: Alejandro Colomar <une+cxx_std-proposals_at_[hidden]>
Date: Sat, 23 May 2026 18:21:17 +0200
Hi Jonathan,

On 2026-05-23T11:14:35+0100, Jonathan Wakely wrote:
> On Sat, 23 May 2026 at 10:32, Alejandro Colomar via Std-Proposals <
> std-proposals_at_[hidden]> wrote:
>
> >
> > What's the point? We already have
> >
> > auto _ = async(Func);
> >
> > Which is objectively better because it tells you what it does. There's
> > an '=', which tells you that it's being assigned, and thus the usual
> > rules apply.
>
>
> Initialized, not assigned ;-)

Oops, thanks for the correction! Indeed. :-)

> There's no assignment there, despite the '=' token.
>
>
> > Are you worried about typing a word as long as 'auto'?
> > I'd worry more about having yet another meaning for '%' which will
> > almost certainly confuse programmers.
>
>
> +1


Have a lovely day!
Alex

-- 
<https://www.alejandro-colomar.es>

Received on 2026-05-23 16:21:25