I was looking on the C++11 libraries, I'm not goot working with C++ objects and templates but I was trying to read the type of a variable and to run different code, but here there is an example that explains better:
if(is_scalar<typeid(list)>)
cout << list << endl;
else
for(...)
cout << list[i] << endl;
I'm trying to do something similar, I think that function is_scalar is exactly what I need cause I need to split the vectors, arrays, and lists from ints, doubles, or floats, etc. It's hard to think of having the same variable that has different type in the same program but I'm trying to change it on runtime (still not working) or with pre-processor defines (that causes me the problem now).