title: Using-declaration of an existing type from base class vs creating a type alias inside child class
body: <p>I would like to provide access to an existing type from base class inside child class.</p>
  
  <p>I found two different ways :</p>
  
  <pre class="lang-cpp prettyprint-override"><code>struct A {
      typedef int mytype;
  };
  
  struct B {
      typedef double mytype;
  };
  </code></pre>
  
  <p>I can "include" the type with a using declaration :</p>
  
  <pre class="lang-cpp prettyprint-override"><code>struct C : A, B {
      using typename A::mytype;
  };
  </code></pre>
  
  <p>Or I can create a type alias :</p>
  
  <pre class="lang-cpp prettyprint-override"><code>struct C : A, B {
      typedef A::mytype mytype;
      using mytype = A::mytype; //C++11
  };
  </code></pre>
  
  <ol>
  <li>Is there any difference ?</li>
  <li>What are the pros and cons of each syntax ?</li>
  <li>Which one is the most used/recommended ?</li>
  </ol>
  
  <p>Thank you.</p>
  
  <p>Related question : <a href="https://stackoverflow.com/questions/58448071/using-declaration-of-an-existing-namespace-type-vs-creating-a-type-alias">Using-declaration of an existing namespace type vs creating a type alias</a></p>