title: C++ no viable constructor copying variable of type
body: <p>I am getting the following error message: </p>
  
  <p><em>main.cpp: No viable constructor copying variable of type 'communal'</em></p>
  
  <p>On the second constructor,<code>communal( const T&amp; instance )</code>, the following message is given: </p>
  
  <p><em>data.h: Candidate constructor not viable: no known conversion from 'communal' to 'const int &amp;' for 1st argument</em></p>
  
  <p>The conversion appears to be going backwards.  I want the conversion to go from const int&amp; to communal.  Is there a way to get implicit conversion to work here?  Thanks for any help. </p>
  
  <p><strong>main.cpp:</strong></p>
  
  <pre><code>communal&lt;int&gt; test_communal1 = 123; // Implicit initialization triggers error
  </code></pre>
  
  <p><strong>data.cpp:</strong></p>
  
  <pre><code>template&lt;typename T&gt;
  struct communal : general_type::communal&lt;T&gt;
  {
      using super = general_type::communal&lt;T&gt;;
  
      communal() : super( nullptr ) {}
      communal( const T&amp; instance ) : super( new T( instance ) ) {}
      communal( const T* instance ) : super( new T( instance ) ) {}
      communal( communal&lt;T&gt;&amp; instance ) : super( instance ) {}
      communal( communal&lt;T&gt;* instance ) : super( instance ) {}
  
      ~communal()
      {
          this-&gt;counter-&gt;deallocate( [this]()
          {
              delete this-&gt;counter;
              delete this-&gt;instance;
          });
      }
  };
  </code></pre>