mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 04:44:34 +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
|
||||
|
||||
???
|
||||
namespace std { // BAD: violates standard
|
||||
class My_vector {
|
||||
// . . .
|
||||
};
|
||||
}
|
||||
|
||||
namespace Foo { // GOOD: user namespace is allowed
|
||||
class My_vector {
|
||||
// . . .
|
||||
};
|
||||
}
|
||||
|
||||
##### Enforcement
|
||||
|
||||
|
||||
Reference in New Issue
Block a user