Back to Basics: Function Call Resolution in C++
Talkat CppCon 2024 · on Tuesday, 2024-09-17· at 09:00· Cottonwood 2/3, 6700 North Gaylord Rockies Boulevard·
summary
Covers exactly how calls like f(x,y) get chosen: concrete rules for name lookup, argument-dependent lookup (ADL), overload resolution rankings, default arguments, and template deduction; shows the practical two-step std::swap trick and when a non-template overload wins ties. Examples trace conversion ranks, lookup order, and candidate sets so compilation errors are explained; slides and code snippets reproduce the surprising ambiguities and the fix that reliably selects a custom swap.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 1:07Function overloading basics
- 10:03Overload resolution rankings
- 17:31Function signatures
- 20:04Name lookup in C++
- 30:13Name lookup vs overload resolution
- 33:27Argument dependent lookup
- 38:33Default args and overload resolution
- 41:26Function templates
- 47:08Customization points
- 58:20Key takeaways
- 59:33Q&A
related talks
01h 00mBack to the basics: Namespaces 101
01h 00mBack to Basics: (Range) Algorithms in C++
01h 05mThe Imperatives Must Go!
01h 02m“Modern C++ Design (part 1 of 2)”
01h 02mBack to Basics: Initialization in C++
01h 02mBack to Basics: Designing Classes (part 2 of 2)
04mCalling code w/o headers...
01h 01mBack to Basics: Designing Classes (part 1 of 2)
