title: Error declaring "using namespace" with a nested namespace ("namespace xxx::yyy not allowed in using-declaration")
body: <p>When I write C++ code, I try to use a <code>using &lt;X&gt;</code> to keep from polluting too much. In Crypto++, it gives me problem in one case. The case is the ASN1 namespace within the CryptoPP namespace (it only shows up in one place).</p>
  
  <p>Here's the declaration in Crypto++: <a href="http://www.cryptopp.com/docs/ref/oids_8h_source.html" rel="noreferrer">http://www.cryptopp.com/docs/ref/oids_8h_source.html</a>.</p>
  
  <p>I can use, for example, <code>secp256r1</code> curve with:</p>
  
  <pre><code>CryptoPP::ASN1::secp256r1();
  </code></pre>
  
  <p>However, I have not figured out a way to declare it with using. When I try:</p>
  
  <pre><code>#include &lt;cryptopp/asn.h&gt;
  #include &lt;cryptopp/oids.h&gt;
  using CryptoPP::ASN1;
  </code></pre>
  
  <p>It eventually leads to <code>error: namespace ‘CryptoPP::ASN1’ not allowed in using-declaration</code>, and then <code>error: ‘ASN1’ has not been declared</code> at the following (I tried them both):</p>
  
  <pre><code>ECIES&lt;ECP&gt;::Decryptor d1(prng, secp256r1());
  ECIES&lt;ECP&gt;::Decryptor d2(prng, ASN1::secp256r1());
  </code></pre>
  
  <p>How does one use a <code>using</code> statement when there is more than one namespace?</p>
  
  <hr>
  
  <pre><code>$ g++ -version
  i686-apple-darwin11-llvm-g++-4.2
  </code></pre>