logoalt Hacker News

gpderetta • 08/15/2026 • 0 replies • view on HN

>You cannot pass a lambda expression to a function that expects a function pointer (e.g. bool(*)(int) in this example)

To be pedantic, you can: as long as the lambda doesn't close over any local variable, the object will decay to a function pointer.