C++ Logo

std-proposals

Advanced search

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

From: Jason McKesson <jmckesson_at_[hidden]>
Date: Sat, 1 Oct 2022 09:51:11 -0400
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.

Received on 2022-10-01 13:52:25