title: Determining which overload was selected
body: <p>Let's say I have some arbitrary complicated overloaded function:</p>
  
  <pre><code>template &lt;class T&gt; void foo(T&amp;&amp; );
  template &lt;class T&gt; void foo(T* );
  void foo(int );
  </code></pre>
  
  <p>I want to know, for a given expression, <em>which</em> <code>foo()</code> gets called. For example, given some macro <code>WHICH_OVERLOAD</code>:</p>
  
  <pre><code>using T = WHICH_OVERLOAD(foo, 0);       // T is void(*)(int);
  using U = WHICH_OVERLOAD(foo, "hello"); // U is void(*)(const char*);
  // etc.
  </code></pre>
  
  <p>I don't know where I would use such a thing - I'm just curious if it's possible. </p>