title: Access declarations are deprecated in favor of using-declarations; suggestion: add the ‘using’ keyword
body: <p>I returned to one of my old C++ school assignments which implemented a binary tree. I have a file (Tree.cpp) that contains functions to insert, lookup, remove, etc nodes. At the top, I have <code>"using namespace std;"</code>. The warnings I am getting are caused by another file, SymTab.hpp, that looks like this:</p>
  
  <pre><code>#ifndef SYMTAB_H
  #define SYMTAB_H
  
  #include &lt;iostream&gt;
  #include "Tree.hpp"
  using namespace std;
  
  template &lt;class Whatever&gt;
  class SymTab : private Tree&lt;Whatever&gt; {
  public:
          Tree&lt;Whatever&gt; :: Insert;
          Tree&lt;Whatever&gt; :: Lookup;
          Tree&lt;Whatever&gt; :: Remove;
          Tree&lt;Whatever&gt; :: Write;
          Tree&lt;Whatever&gt; :: Set_Debug_On;
          Tree&lt;Whatever&gt; :: Set_Debug_Off;
  };
  
  #endif
  </code></pre>
  
  <p>Each of the lines after <code>public:</code> give a warning like:</p>
  
  <blockquote>
    <p>"SymTab.hpp:11:9: warning: access declarations are deprecated in
    favour of using-declarations; suggestion: add the ‘using’ keyword
    [-Wdeprecated] Tree :: Insert;", where "Insert is replaced
    with each respective function name.</p>
  </blockquote>
  
  <p>Any advice on namespaces and how to get rid of these warnings?</p>