title: Template: get proper variable name from type name
body: <p>Let's say, I have 4 arrays of 4 different pointer types.
  And I want a template function, which stores it's argument in the proper array. Something like this</p>
  
  <pre><code>int*            arr_int[10];
  double*         arr_double[10];
  uint64_t*       arr_uint64_t[10];
  
  
  template &lt;typename T&gt; 
  void add_value (int pos, T value) {
          //i want to store value in the array of it's type
          arr_##(*T)[pos]=value;
          //of course, this does not work :)
  }
  
  int main(int argc, char *argv[])
  {
          int      a = 2;
          double   b = 4.2;
          uint64_t c = 123456;
  
          add_value(0,&amp;a);
          add_value(0,&amp;b);
          add_value(0,&amp;c);
  
          //add more values
          //do something with arrays
          ....
  
          return 0;
  } 
  </code></pre>
  
  <p>Is it possible?</p>