Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by gpderetta

2 days ago

>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.

0 comments

gpderetta

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities