title: C++ namespace resolution for inner namespace
body: <p>Please, explain me why this code results in a linkage error:</p>
  
  <p>xxx.h</p>
  
  <pre><code>namespace ns
  {
      namespace inner
      {
          void func();
      }
  }
  </code></pre>
  
  <p>xxx.cpp</p>
  
  <pre><code>using namespace ns;
  using namespace inner; //or "using "namespace ns::inner;" results in the same error
  
  void func()
  {
  }
  </code></pre>
  
  <p>while this code works fine:</p>
  
  <p>xxx.h</p>
  
  <pre><code>namespace ns
  {
      void func();
  }
  </code></pre>
  
  <p>xxx.cpp</p>
  
  <pre><code>using namespace ns;
  
  void func()
  {
  }
  </code></pre>