title: Templated function can't convert 'int' to nullptr_t
body: <p><strong>TL;DR:</strong></p>
  
  <p>Why can't templated functions access the same conversions that non-templated functions can?</p>
  
  <pre><code>struct A {
      A(std::nullptr_t) {}
  };
  
  template &lt;typename T&gt;
  A makeA(T&amp;&amp; arg) {
      return A(std::forward&lt;T&gt;(arg));
  }
  
  void foo() {
      A a1(nullptr); //This works, of course
      A a2(0); //This works
      A a3 = makeA(0); //This does not
  }
  </code></pre>
  
  <hr>
  
  <p><strong>Background</strong></p>
  
  <p>I'm trying to write some templated wrapper classes to use around existing types, with the goal of being drop-in replacements with minimal need to rewrite existing code that uses the now-wrapped values.</p>
  
  <p>One particular case I can't get my head around is as follows: we have a class which can be constructed from <code>std::nullptr_t</code> (here called A), and as such, there's plenty of places in the code base where someone has assigned zero to an instance.</p>
  
  <p>However, the wrapper cannot be assigned a zero, despite forwarding the constructors. I have made a very similar example that reproduces the issue without using an actual wrapper class - a simple templated function is sufficient to show the issue.</p>
  
  <p>I would like to allow that syntax of being able to assign zero to continue to be allowed - it isn't my favourite, but minimising friction to moving to newer code is often a necessity just to get people on board with using them.</p>
  
  <p>I also don't want to add a constructor that takes any int other than zero because that's very much absurd, was never allowed before, and it should continue to be caught at compile time.</p>
  
  <p>If such a thing is not possible, it would satisfy me to find an explanation, because with as much as I know so far, it makes no sense to me.</p>
  
  <p>This example has the same behaviour in VC++ (Intellisense seems to be OK with it though...), Clang, and GCC. Ideally a solution will also work in all 3 (4 with intellisense) compilers.</p>
  
  <p>A more directly applicable example is follows:</p>
  
  <pre><code>struct A {
      A(){}
      A(std::nullptr_t) {}
  };
  
  template &lt;typename T&gt;
  struct Wrapper {
      A a;
      Wrapper(const A&amp; a):a (a) {}
  
      template &lt;typename T&gt;
      Wrapper(T&amp;&amp; t): a(std::forward&lt;T&gt;(t)){}
  
      Wrapper(){}
  };
  
  void foo2() {
      A a1;
      a1 = 0; // This works
  
      Wrapper&lt;A&gt; a2;
      a2 = 0; //This does not
  }
  </code></pre>