~/talk

Namespaces 101

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

Covers namespace syntax and evolution with dates: C++98 namespaces, C++11 inline namespaces, C++17 nested namespace openings and C++20 nested inline openings. Explains qualified vs unqualified lookup and argument dependent lookup (ADL) with concrete examples showing when AB::x resolves, when unqualified lookup climbs scopes, and how ADL finds functions by argument types. Demonstrates hazards: using-directive pollution creating ambiguities, macros escaping namespaces, and shows practices from Core Guidelines and Google: avoid using namespace std in headers, prefer using-declarations in .cpp, use inline namespaces only for versioning.

AI-written summary · about

  1. 0:00Introduction to namespaces
  2. 2:43Understanding namespaces
  3. 7:20Evolution of namespaces
  4. 15:34Namespace mechanics
  5. 34:46Namespace scope and pollution
  6. 51:33Anonymous namespaces
  7. 53:03Best practices
~/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.