title: Why is it forbidden to qualify name in extern declaration?
body: <p>Why are names introduced by an extern declaration only allowed to come from the innermost enclosing namespace? What complication would it draw in, if they weren't? Or is it just because this part of standard was copied from C standard, where no namespace take place?</p>
  
  <p><a href="https://timsong-cpp.github.io/cppwp/basic.link#8" rel="nofollow noreferrer">Please see the respective part of the standard</a></p>
  
  <p>EDIT:
  An example scenario where qualification would be handy: a use of <code>x</code> in the  function template <code>f</code> in namespace <code>ns</code>, where <code>x</code> is defined somewhere in the global namespace and is not desirable to be introduced (outside the function definition) in all translation units that <em>#include</em> the header with <code>f</code>.</p>
  
  <pre><code>namespace ns
  {
    template &lt;typename&gt; void f()
    {
      // extern int ::x; // ill-formed
      extern int x;      // refers to ns::x, which is not the case :(
      ++x;
    }
  }
  </code></pre>