title: Get the type and size of a template variable
body: <pre><code>template&lt;class TYPE&gt;
  void execute(TYPE data)
  {
      int size = sizeof(data)*sizeof(TYPE);
  }
  </code></pre>
  
  <p>The above returns wrong result.</p>
  
  <p>I am calling the template like this:</p>
  
  <pre><code>execute(&amp;variable);
  </code></pre>
  
  <p>The variable can be any type, <strong>but will always be array.</strong></p>
  
  <p>I expect the code to return size as <strong>(the number of elements in array)*(the size of the variable type)</strong></p>
  
  <p>For example, if I have an array of floats with 2 elements, I want to return 2*4 = 8;</p>