~/talk

Don’t Get Overloaded by C++ Overload Sets

Talkat C++ on Sea 2025 · 2025-06-23..06-25· [c-and-cpp]
slides:none on file

Covers concrete overload-resolution mechanics: name lookup picks one scope then overload resolution ranks exact match, promotions before conversions, user‑defined conversions, then ellipsis; initializer-list takes priority over other overloads and default construction; templates compete by “most specialized” rules and non‑templates win ties; ADL brings functions from argument namespaces; illustrates real bugs — an implicit conversion making std::optional appear engaged, hiding of base overloads in derived classes and multiple‑inheritance ambiguities — and gives fixes: using-declarations, tagging, or wrapping functions in a struct to prevent ADL.

AI-written summary · about

  1. 0:00Introduction
  2. 1:30Overload sets in C++
  3. 5:21Overload sets in practice
  4. 12:26How overload sets resolve
  5. 17:04Argument dependent lookup
  6. 19:56Overload resolution rules
  7. 27:46Overload resolution with templates
  8. 32:20Gotchas with templates
  9. 37:23Member function overload sets
  10. 41:15Qualified member overloads
  11. 44:32Controlling overload sets
  12. 49:32Avoiding overload sets
  13. 50:15Using lambdas
  14. 55:05Designing overload sets
  15. 57:32Tag dispatching
  16. 59:18Virtual functions and overloads
  17. 1:02:52Value category overloads
  18. 1:04:17Summary
~/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.