Skip to content

Commit bece988

Browse files
Changed "Never use 'using' In a Header File" guideline.
Changed it to "Never use 'using namespace' ...". Also added some more explanation.
1 parent a9de313 commit bece988

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

03-Style.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,11 @@ int myFunc()
9090

9191
which would be impossible if the function comment header used `/* */`
9292

93-
## Never Use `using` In a Header File
93+
## Never Use `using namespace` In a Header File
9494

9595
This causes the name space you are `using` to be pulled into the namespace of the header file.
96+
It litters the own namespace and it may lead to name collisions in the future.
97+
Writing `using namespace` in an implementation file is fine though.
9698

9799

98100
## Include Guards

0 commit comments

Comments
 (0)