I wanted to know if a variable can be equal to a type (here it's the magic_type
)
#include <typeinfo>
template<typename T>
class C
{
public:
magic_type t;
t list;
T data;
C(void)
{
if (typeid(data) == typeid(int))
t = float; // so typeid(list) = typedid(float)
else
t = int; // and typeid(list) = typedid(int)
}
};