title: Define variable b of the same type as variable a
body: <p>Is it possible to declare a variable <code>var_b</code> of the same type as another variable, <code>var_a</code>?</p>
  
  <p>For example:</p>
  
  <pre><code>template &lt;class T&gt;
  void foo(T t) {
  
     auto var_a = bar(t);
     //make var_b of the same type as var_a
  
  }
  
  
  F_1 bar(T_1 t) {
  
  }
  
  F_2 bar(T_2 t) {
  
  }
  </code></pre>