title: Why is it not possible to use a template alias in function as parameter and to be automatically deduced?
body: <p>I was trying to simplify a template function by using a template alias instead of the underlying type:</p>
  
  <pre><code>template&lt;typename T,
      typename Traits = std::char_traits&lt;T&gt;,
      typename Allocator = std::allocator&lt;T&gt;,
      typename String = std::basic_string&lt;T, Traits, Allocator&gt;,
      typename Vector = std::vector&lt;String&gt;&gt;
  Vector make_vector_from_string(const String &amp; str)
  {
      //do something with str parameter
  
      return Vector{
          {str}
      };
  }
  </code></pre>
  
  <p>But the caller is required to specify the template type because the compiler fails to deduce T for the parameter:</p>
  
  <pre><code>std::string bar{"bar"};
  auto strings{make_vector_from_string&lt;char&gt;(bar)};
  </code></pre>
  
  <p>If the function parameter type is changed to <code>std::basic_string&lt;T, Traits, Allocator&gt;</code> instead of <code>String</code> the caller can simply call <code>make_vector_from_string(bar);</code> without having to specify the template parameter. Why is that?</p>