title: Choosing between template instantiation with pointer arguments
body: <p>Look at the following test code:</p>
  
  <pre><code>template&lt;class T&gt; struct Wrap {};
  
  template&lt;typename T&gt; inline
  void fun (T *&amp;Int)          // **choice 1**
  {}
  
  template&lt;typename T&gt; inline
  void fun (Wrap&lt;T&gt; *&amp;Int)    // **choice 2**
  {}
  
  int main()
  {
    int i = 6;
    fun((char*&amp;)(i));         // **call 1**
    fun((Wrap&lt;char&gt;*&amp;)(i));   // **call 2**
  }
  </code></pre>
  
  <p>When I run this code in linux g++, it works as per expectations. When fun() is called with char*&amp;, it calls function of choice 1 straight forward.
  However, I am interested when we call fun() with Wrap&lt; char >*&amp; and it calls the choice 2. Even though choice 1 and 2 both appear valid for the 2nd call, compiler manages to choose little better contender -> choice 2 (because it exists).</p>
  
  <p><strong>Question</strong>: Is it guaranteed that, the same behavior will be retained for any other compiler for C++ ? If not, then is there any other alternative to make it deterministic?</p>