 <p><code>Data&lt;void *&gt; obj;</code> constructs a Data object to store <code>void *</code> type using the parameterized constructor passing <code>new Data</code> as the parameter value. <code>obj</code> itself needs to be a pointer:</p> <pre><code>#include &lt;iostream&gt; int main(){ Data&lt;float&gt; *obj = new Data&lt;float&gt;(31.34f); std::cout &lt;&lt; obj-&gt;val; } </code></pre> <p>Your version is equivalent to:</p> <pre><code>Data&lt;void *&gt; objs; // no param constructor /* Data&lt;float&gt;(31.34f); param constructor */ obj = Data&lt;void *&gt;(new Data&lt;float&gt;(31.34f)); // param constructor </code></pre>