title: Offset of a variable (inherited from the base template class) shadowed by a member with the same name
body: <p>I have a tuple class implemented using inheritance (it's from <em>C++ Templates: The Complete Guide, 2nd Edition</em>, Vandevoorde, Josuttis, Gregor):</p>
  
  <pre><code>template&lt;typename... _Value&gt;
  class Tuple {};
  
  template&lt;unsigned int HEIGHT, typename _Value&gt;
  class TupleElement {
  public:
      TupleElement() = default;
  
      template&lt;typename _OtherValue&gt;
      TupleElement(_OtherValue &amp;&amp; other): _value{std::forward&lt;_OtherValue&gt;(other)} {}
  
      _Value _value;
  };
  
  template&lt;typename _Head, typename... _Tail&gt;
  class Tuple&lt;_Head, _Tail...&gt;: public TupleElement&lt;sizeof...(_Tail), _Head&gt;, public Tuple&lt;_Tail...&gt; {
      using HeadElement = TupleElement&lt;sizeof...(_Tail), _Head&gt;;
  public:
      template&lt;typename _HeadArgument, typename... _TailArgument&gt;
      Tuple(_HeadArgument &amp;&amp; head, _TailArgument &amp;&amp;... tail): HeadElement{std::forward&lt;_HeadArgument&gt;(head)}, Tuple&lt;_Tail...&gt;{std::forward&lt;_TailArgument&gt;(tail)...} {}
  
      _Head &amp; getHead() {
          return static_cast&lt;HeadElement *&gt;(this)-&gt;get();
      }
  
      const _Head &amp; getHead() const {
          return static_cast&lt;const HeadElement *&gt;(this)-&gt;get();
      }
  
      Tuple&lt;_Tail...&gt; &amp; getTail() { return *this; }
  
      const Tuple&lt;_Tail...&gt; &amp; getTail() const { return *this; }
  };
  
  template&lt;&gt;
  class Tuple&lt;&gt; {};
  </code></pre>
  
  <p>I'm using this template to create new types as if they were structures with homogeneous member variables ordered by the template arguments' order. I need the offset of every inherited <code>_value</code> member. I'm trying to achieve it with <code>offsetof</code>, but passing <code>_value</code> with the type of the tuple returns:</p>
  
  <pre><code>using T = Tuple&lt;int, float&gt;;
  offsetof(T, _value);
  </code></pre>
  
  <h3>The error</h3>
  
  <pre><code>1&gt;***.cpp(22): error C2385: ambiguous access of '_value'
  1&gt;***.cpp(22): note: could be the '_value' in base 'TupleElement&lt;1,int&gt;'
  1&gt;***.cpp(22): note: or could be the '_value' in base 'TupleElement&lt;0,float&gt;'
  </code></pre>