C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Lambda type not isolated within function

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Thu, 20 Apr 2023 18:43:08 +0300
On Thu, 20 Apr 2023 at 18:36, Arthur O'Dwyer <arthur.j.odwyer_at_[hidden]> wrote:
>
> On Thu, Apr 20, 2023 at 11:28 AM Ville Voutilainen <ville.voutilainen_at_[hidden]> wrote:
>>
>> On Thu, 20 Apr 2023 at 18:09, Arthur O'Dwyer <arthur.j.odwyer_at_[hidden]> wrote:
>> > @Ville, I agree 100% with the "Why would we?" part, but I don't see what you mean about "new kind of lambda."
>>
>> Right now, you can declare two kinds of lambdas; ones that don't have
>> captures, and ones that do. You can't declare
>> a lambda that takes its captures as constructor arguments. So that
>> would be a new kind of lambda.
>
>
> Ah, okay. I had considered that "changing the semantics of one of the two existing kinds," not "introducing a new kind and retiring one of the old kinds," but I see. :)

I don't think there's anything to retire here, and I don't think it's
reasonable to entertain changing the existing semantics.

Received on 2023-04-20 15:43:20