title: Why compiler does not see method of base class when using CRTP
body: <p>I have the following piece of code:</p>
  
  <pre><code>struct Iface
  {
      virtual int Read() = 0;
  
      int Read(int x) {
          return Read() + x;
      }
  };
  
  template &lt;typename Impl&gt;
  struct Crtp : public Iface
  {
      virtual int Read() {
          return static_cast&lt;Impl&amp;&gt;(*this).ReadImpl();
      }
      //using Iface::Read;
  };
  
  struct IfaceImpl : public Crtp&lt;IfaceImpl&gt;
  {
      int ReadImpl() {
          return 42;
      }
  };
  
  int main()
  {
      IfaceImpl impl;
      impl.Read(24); // compilation error
  
      Iface&amp; iface = impl;
      iface.Read(24); // always compiles successfully
  }
  </code></pre>
  
  <p>Both msvc, gcc and clang reject this code, they cannot find method <code>Read(int x)</code></p>
  
  <p>However if I uncomment <code>using Iface::Read</code> in <code>Crtp</code> my code compiles successfully.</p>
  
  <p>Note that if I take a reference to Iface I can call <code>Read(int x)</code></p>
  
  <p>Why does this happen?</p>