mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 12:44:42 +03:00
SL_3 'Do not add non-standard entities to namespace std' add example (#2031)
* SL_3 add example * Update isocpp.dic add My_Vector
This commit is contained in:
@@ -19754,7 +19754,17 @@ Additions to `std` might clash with future versions of the standard.
|
|||||||
|
|
||||||
##### Example
|
##### Example
|
||||||
|
|
||||||
???
|
namespace std { // BAD: violates standard
|
||||||
|
class My_vector {
|
||||||
|
// . . .
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace Foo { // GOOD: user namespace is allowed
|
||||||
|
class My_vector {
|
||||||
|
// . . .
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
##### Enforcement
|
##### Enforcement
|
||||||
|
|
||||||
|
|||||||
@@ -347,6 +347,7 @@ Murray93
|
|||||||
mutex
|
mutex
|
||||||
mutexes
|
mutexes
|
||||||
mx
|
mx
|
||||||
|
My_vector
|
||||||
MyCustomError
|
MyCustomError
|
||||||
MyException
|
MyException
|
||||||
myMap
|
myMap
|
||||||
|
|||||||
Reference in New Issue
Block a user