Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code review for <functional> improvements #58

Open
tap opened this issue Nov 6, 2015 · 0 comments
Open

code review for <functional> improvements #58

tap opened this issue Nov 6, 2015 · 0 comments

Comments

@tap
Copy link
Member

tap commented Nov 6, 2015

  • std::mem_fn and std::bind have performance issues, can't be inlined, etc.
  • lots of hidden gotchas to the above
  • use lambdas (it is a core language feature, not an STL feature)
  • std::function is awesome, but use it only when necessary (if you can use a template class or auto or something then that is better), but it does have space cost and it prevents inlining.

See video by Stephan T Lavavej from CPPCON 2015.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant