title: Best practices: using namespace or reopen namespace?
body: <p>Assume I've declared a function (or class, doesn't matter) in a header file, which is part of namespace foo:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>namespace foo
  {
      void bar();
      …
  }
  </code></pre>
  
  <p>For a long time I've been reopening the namespace when I was defining the function in a cpp file:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>namespace foo
  {
  void bar()
  {
      doSomething();
      …
  }
  }
  </code></pre>
  
  <p>That is because I learned it this way and it was used in a project I was working on. I never really though about it until recently, when I stumbled upon a project which used the using directive instead:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>using namespace foo;
  
  void bar()
  {
      doSomething();
      …
  }
  </code></pre>
  
  <p>Finally there's an option of using the full name. I find it pretty tedious, especially when classes with a lot of members are involved. In my opinion it doesn't make much sense when all content of the file is a part of one namespace.</p>
  
  <pre class="lang-cpp prettyprint-override"><code>void foo::bar()
  {
      doSomething();
      …
  }
  </code></pre>
  
  <p>So my question is which one should be preferred and why? Especially regarding the first two options (using directive vs. reopen namespace).</p>