title: Collision of mixed-case namespace names
body: <p>C++ namespaces prevent collisions, but what if the name of the namespace itself collides? Example:</p>
  
  <pre><code>#include &lt;cstdlib&gt;
  
  namespace atoi {
      int foo() {return 42;}
  }
  </code></pre>
  
  <p>Question: can I reliably avoid the collision by <code>namespace Atoi</code>? That is, does C++ protect my use of a mixed-case namespace name like <code>Atoi</code>? Or is a mixed-case namespace name like <code>Atoi</code> liable to be trampled by a future C++ standard, technical specification (TS), Boost library, compiler, toolchain, etc.?</p>
  
  <p>Of course, I do not really intend <code>namespace atoi</code> or <code>namespace Atoi</code> for practical code. Those are merely for illustration (since <code>atoi</code> happens to be a name the C standard library uses). What I really intend is <code>namespace my</code>, preferably in lower case but if necessary in mixed case as <code>namespace My</code>. Your answer regarding <code>atoi</code> and <code>Atoi</code> could influence my choice between <code>my</code> and <code>My</code>. This is why I ask.</p>
  
  <p>I notice that Stroustrup prefers mixed-case namespace names. I also notice that examples in sect. 10.3 of the C++17 standard (draft <a href="http://open-std.org/JTC1/SC22/WG21/docs/papers/2017/n4659.pdf" rel="nofollow noreferrer">here</a>) avoid lower-case namespace names.</p>
  
  <p>See also <a href="https://stackoverflow.com/q/5080286/1275653">this related question.</a></p>