Ability to decay capturing lambdas into plain functions with a context argument #1389
DerpMcDerp
started this conversation in
Suggestions
Replies: 1 comment 2 replies
-
What's the benefit of this over the lambda being an object of some type with a regular |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
C++ has a feature where a lambda without a capture can decay into a regular function pointer:
It would be nice if capturing lambdas could decay to a regular function pointer taking a
context
argument:The way this can be done in cpp2 is with something like:
cpp2 can translate this into:
Beta Was this translation helpful? Give feedback.
All reactions