C++ Logo

std-proposals

Advanced search

Re: [std-proposals] lambda capture rules are too simplistic

From: blacktea hamburger <greenteahamburger_at_[hidden]>
Date: Sat, 1 Oct 2022 22:02:22 +0800
Well... I think since capture-default is used, the intent is to want to
capture. Thanks!

On Sat, Oct 1, 2022 at 9:52 PM Jason McKesson via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> On Sat, Oct 1, 2022 at 9:44 AM blacktea hamburger via Std-Proposals
> <std-proposals_at_[hidden]> wrote:
> >
> > The standard can specify that it is not captured.
>
> Why bother? It won't actually affect any user-facing behavior. By
> declaring your lambda with `[=]`, it is not captureless and therefore
> cannot benefit from any captureless features. So besides adding more
> exceptions to the language, how does it improve things?
>
> > I don't think it's good to pin hopes of optimization on implementations.
>
> The avalanche has already started; it is too late for the pebbles to vote.
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2022-10-01 14:02:57