...
Code Block |
---|
namespace MyNamespace { int ilength; } namespace MyNamespace { int iwidth; } void f() { MyNamespace::ilength = MyNamespace::iwidth = 12; } |
The standard library introduces the namespace std
for standards-provided declarations such as std::string
, std::vector
, and std::for_each
. However, it is undefined behavior to introduce new declarations in namespace std
except under special circumstances. The C++ Standard, [namespace.std], paragraphs 1 and 2 [ISO/IEC 14882-2014], states the following:
...