C++ Logo

std-proposals

Advanced search

Re: [std-proposals] std::is_lambda

From: Jason McKesson <jmckesson_at_[hidden]>
Date: Wed, 22 Feb 2023 09:33:34 -0500
On Wed, Feb 22, 2023 at 4:09 AM Frederick Virchanza Gotham via
Std-Proposals <std-proposals_at_[hidden]> wrote:
>
> Why don't we have a means of determining if something is a lambda?

Because you should never, *ever* be able to write code that permits a
type that happens to be a lambda and a type that doesn't. Or
vice-versa. Lambdas are just compiler-generated types. The only
special thing about them is where they come from, not how they get
used.

Received on 2023-02-22 14:34:28