
If you don't show me what the first idea is, I can't really suggest another one :) What are you trying to accomplish, and what exactly did you do?
I am sorry for my confusing question. I wrote the template like this: ------------------------------------------------------------------------------ template <> // double struct Is_Type<double> { static const int value = 0;}; template <> // int struct Is_Type<int> { static const int value = 1;}; ------------------------------------------------------------------------------ And then, I call Is_Type<typename>::value to compare and figure if two types are different : ------------------------------------------------------------------------------ if ( Is_Type<int>::value == Is_Type<double>::value ) ------------------------------------------------------------------------------ However, I think there is a huge number of types. Therefore, this solution will not be efficient. I would like to ask if you could suggest me a better way. Regards, Tri Nguyen.