title: How to utilize template copy&move constructor and assignment operator?
body: <p>Consider the following C++ code with my failed attempt to avoid <a href="https://stackoverflow.com/a/32539424/1915854">preference of non-template copy&amp;move constructors and assignment operators</a>:</p>
  
  <pre><code>template&lt;typename T&gt; class A {
  public:
      A() { /* implementation here */ }
  
      // Remove from the overloads the default copy&amp;move constructors and assignment operators
      A(const A&amp;) = delete;
      A&amp; operator=(const A&amp;) = delete;
      A(A&amp;&amp;) = delete;
      A&amp; operator=(A&amp;&amp;) = delete;
  
      // I want these to be used e.g. by std::vector
      template&lt;typename U&gt; A(const A&lt;U&gt;&amp; fellow) { /* implementation here */ }
      template&lt;typename U&gt; A&amp; operator=(const A&lt;U&gt;&amp; fellow) { /* implementation here */ }
  
      template&lt;typename U&gt; A(A&lt;U&gt;&amp;&amp; fellow) { /* implementation here */ }
      template&lt;typename U&gt; A&amp; operator=(A&lt;U&gt;&amp;&amp; fellow) { /* implementation here */ }        
  };
  </code></pre>
  
  <p>However, I get the following error</p>
  
  <blockquote>
    <p>attempting to reference a deleted function</p>
  </blockquote>
  
  <p>when trying to push <code>A</code> items to a vector or simply copy-construct like:</p>
  
  <pre><code>A&lt;int&gt; a1{};
  A&lt;int&gt; a2(a1);
  </code></pre>
  
  <p>UPDATE1: I need template copy&amp;move constructors and assignment operators, because the template argument really just controls some caching, so <code>A&lt;T1&gt;</code> can be safely assigned to <code>A&lt;T2&gt;</code>.</p>