title: Accessing property of parent class inside another template class
body: <p>I have the following code:</p>
  <pre class="lang-cpp prettyprint-override"><code>template&lt;typename T&gt;
  struct O {
      struct A {
          int a;
      };
      struct B: A {
          auto f() {
              this-&gt;a += 1; // OK
              a += 1;       // ERROR: 'a' was not declared in this scope
          }
      };
  };
  </code></pre>
  <p>If I try to access <code>a</code> property of the base class using <code>this</code> pointer, compilation works great, but otherwise compiler does produce error: <code>'a' was not declared in this scope</code>.</p>
  <p>Why does it happen?</p>
  <p>P.S. Looks like it does work in MSVC, but does not work in GCC and Clang.</p>