~/talk

Overloading: The Bane of All Higher-Order Functions

Talkat CppCon 2018 · 2018-09-23..09-28· [c-and-cpp]
links:none on file
slides:none on file

Explains why passing overloaded functions or function templates into higher‑order code fails and shows concrete workarounds and proposals: function templates compile for direct calls but cannot be passed to std::transform, templated call‑operator objects require construction, lambdas need tedious perfect forwarding plus explicit decltype and noexcept plumbing, macros can hide that, global function objects hit ODR unless C++17 inline variables are used. Demonstrates lifting overload set hacks, std::overload_set proposal, operator and member projection lifting, and the remaining standardization costs and tradeoffs.

AI-written summary · about

  1. 0:00Introduction to overloading
  2. 1:04Problem with function templates
  3. 5:04Function objects and limitations
  4. 8:21Macros and lambdas as workarounds
  5. 9:46Global function objects and ODR
  6. 11:57Lifting overload sets proposal
  7. 14:28std::overload_set proposal
  8. 17:38Summary and call to action
  9. 18:00Q&A with Michal
~/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.