title: Implicit template type deduction with two arguments of different types
body: <p>Assume the following situation:</p>
  
  <p>Type <code>A</code> and type <code>B</code>, <code>B</code> can be implicitly converted to <code>A</code> but the opposite is untrue.</p>
  
  <p>I have a function</p>
  
  <pre><code>template&lt;class T&gt;
  void do_stuff(T a, T b);
  </code></pre>
  
  <p>I want to call said function as such:</p>
  
  <pre><code>do_stuff(A{}, B{});
  </code></pre>
  
  <p>The problem here is that the compiler can't deduce the type and instead says:</p>
  
  <pre><code>template argument deduction/substitution failed
  </code></pre>
  
  <p>I can call my function like this:</p>
  
  <pre><code>do_stuff&lt;A&gt;(A{}, B{});
  </code></pre>
  
  <p>But this is more annoying for the user.</p>
  
  <p>Alternatively I can do something like this:</p>
  
  <pre><code>template&lt;class T, class M&gt;
  void do_stuff(T a, M b);
  </code></pre>
  
  <p>But then b goes on its merry way to be of type B (with the prior invocation).</p>
  
  <p>Ideally I would like something like:</p>
  
  <pre><code>template&lt;class T, class M = T&gt;
  void do_stuff(T a, M b);
  </code></pre>
  
  <p>Or:</p>
  
  <pre><code>template&lt;class T@INSERT MAGIC SO THAT T IS DEDUCED AS BEING THE TYPE OF ARGUMENT NR 1@&gt;
  void do_stuff(T a, T b);
  </code></pre>
  
  <p>Is such a thing possible ?</p>