Is it possible to store a type name as a C++ variable? For example, like this:
type my_type = int; // or string, or Foo, or any other type void* data = ...;
You can't do that in C++, but you can use the boost any library then test for the type it holds. Example:
bool is_int(const boost::any & operand) { return operand.type() == typeid(int); }
http://www.boost.org/doc/libs/1_42_0/doc/html/any/s02.html