Is it possible to get the assigned template type outside the templated class?
<p>Here is a simplified version of what I'm trying to do</p>

<pre><code>template &lt;typename T&gt;
class myClass {};

auto p = new myClass&lt;int32_t&gt;;
int TSizeOfP = sizeof(??);
</code></pre>

<p>So I want to get the T which I set to int32_t outside myClass from the object pointer.</p>

<p>Obviously I know what I set it to so I could just do = sizeof(int32_t) but I want to be able to declare the type just once and not have to go over all the places where i wrote sizeof(int32_t) if I decide to change the type. </p>

<p>I could also do something like #define pType int32_t or using statement or whatever but if there is a way to do it without the extra line, I'd like to hear about it.</p>