title: Why does my class member not exist?
body: <p>I wrote a map class:  </p>
  
  <pre><code>typedef int (&amp; func(const std::string &amp;));
  
  template &lt;class t_child&gt;
  class map final
  {
      std::vector&lt;t_child&gt; m_table;
      const func m_hasher;
  public:
      explicit map(const func hasher) : m_hasher(hasher) {}
      map(const map &amp;copy) = delete;
      ~map();
      map &amp;operator=(const map&amp;) = delete;
      //***
  };
  </code></pre>
  
  <p>But I am getting the error:  </p>
  
  <pre><code>map.hpp:15: error: class ‘map&lt;t_child&gt;’ does not have any field named ‘m_hasher’
       explicit map(const func hasher) : m_hasher(hasher) {}
                                         ^~~~~~~~
  </code></pre>
  
  <p>What's wrong? Why does it not exist?</p>