title: GTest Typed Test - Using
body: <p>I want to use 'MyType' from the base class in the 'DoesBlah' test below.</p>
  
  <pre><code>#include &lt;gtest/gtest.h&gt;
  
  template &lt;typename T&gt;
  struct MemberVariable
  {
      T m_t;
  };
  
  struct Base : public ::testing::Test
  {
      template &lt;typename MemberType&gt;
      using MyType = MemberVariable&lt;MemberType&gt;;
  };
  
  template &lt;typename DerivedType&gt;
  struct Derived : public Base
  {
  };
  
  typedef ::testing::Types&lt;int, char&gt; MyTypes;
  TYPED_TEST_CASE(Derived, MyTypes);
  
  TYPED_TEST(Derived, DoesBlah)
  {
      MyType&lt;TypeParam&gt; test;
      test.m_t = (TypeParam)1;
      ASSERT_EQ(test.m_t, 1);
  }
  </code></pre>
  
  <p>However, I get the following compilation error:</p>
  
  <pre><code>gti/specific/level/Test.t.cpp: In member function 'virtual void Derived_DoesBlah_Test&lt;gtest_TypeParam_&gt;::TestBody()':
  gti/specific/level/Test.t.cpp:25:5: error: 'MyType' was not declared in this scope
       MyType&lt;TypeParam&gt; test;
  </code></pre>
  
  <p>I tried using TestFixture::MyType, typename TestFixture::MyType, but both did not work.</p>
  
  <p>How can I get Derived to recognize that there's something called 'MyType'?</p>