Skip to content

Commit 0d70ae9

Browse files
authored
SL_3 'Do not add non-standard entities to namespace std' add example (isocpp#2031)
* SL_3 add example * Update isocpp.dic add My_Vector
1 parent 6a0b5e6 commit 0d70ae9

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

CppCoreGuidelines.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19754,7 +19754,17 @@ Additions to `std` might clash with future versions of the standard.
1975419754

1975519755
##### Example
1975619756

19757-
???
19757+
namespace std { // BAD: violates standard
19758+
class My_vector {
19759+
// . . .
19760+
};
19761+
}
19762+
19763+
namespace Foo { // GOOD: user namespace is allowed
19764+
class My_vector {
19765+
// . . .
19766+
};
19767+
}
1975819768

1975919769
##### Enforcement
1976019770

scripts/hunspell/isocpp.dic

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ Murray93
347347
mutex
348348
mutexes
349349
mx
350+
My_vector
350351
MyCustomError
351352
MyException
352353
myMap

0 commit comments

Comments
 (0)