Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
C++
/
Namespaces
What happens to an unnamed-namespace variable defined in a header included by three trans…
from Namespaces
C++23
intermediate
1 min
What happens to an unnamed-namespace variable defined in a header included by three translation units?
Each translation unit gets its own internal-linkage entity.
The linker automatically merges all three into one object.
The variable becomes a member of the global namespace with external linkage.
The program is ill-formed solely because the header was included more than once.
Check
Ask AI about this kata
Report an error
previous kata
Spot the bug in the render definition
Spot the bug
next kata
Which statement best describes using metrics::distance; inside a function?
Quiz
A new version is available
Reload