~/talk

functional: What's New, And Proper Usage

Talkat CppCon 2015 · 2015-09-21..09-25· [functional-programming]
links:none on file
slides:none on file

functional evolves across C++11/14/17: use invoke for generic calling (it correctly handles PMFs/PMDs and smart pointers), avoid mem_fn and bind in hot paths—prefer lambdas for speed and clarity, and use reference_wrapper when you must prevent algorithm copies. std::function erases types but requires copyable callables, benefits from the small functor optimization only if the callable is noexcept move constructible, and VS2015 empirically shows 40B/32B (x86) and 64B/48B (x64) thresholds for in-object storage.

AI-written summary · about

  1. 0:00Introduction to functional
  2. 1:33Core language lambdas
  3. 4:57Using std::invoke
  4. 12:22The result_of type trait
  5. 18:40Modernizing mem_fn
  6. 22:22Transparent operators
  7. 25:10Why avoid std::bind
  8. 33:05Reference wrappers
  9. 36:34Deprecated library features
  10. 38:50Understanding std::function
  11. 52:45Questions and answers
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.