~/talk

Back to Basics - Name Lookup and Overload Resolution in C++

Talkat CppCon 2022 · 2022-09-11..09-16· [rust]
slides:none on file

Explains exactly how name lookup and overload resolution produce surprising behavior: unqualified lookup stops at the first scope found so a later overload can cause a silent behavioral regression; argument-dependent lookup finds functions by argument namespaces but resolves aliases to their underlying types; friend functions defined inside a class are hidden friends visible only via ADL; shows a C++20 customization point object pattern (ranges::swap style) that reliably finds user swaps and avoids global hijacks, and recommends flat namespaces and no function template specializations.

AI-written summary · about

  1. 0:00Name lookup basics
  2. 1:47Overload sets and costs
  3. 8:27How name lookup works
  4. 15:33Unqualified lookup pitfalls
  5. 19:04Argument-dependent name lookup explained
  6. 28:07Lookup in function templates
  7. 35:16Customization points and hidden friends
  8. 42:02Swapping with ADL and ranges
  9. 52:29Lookup with template specializations
  10. 56:39Overload resolution process
  11. 1:00:11Summary
~/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.