
AMDG nguyen vu tri wrote:
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.
boost::is_same<int, double>::value In Christ, Steven Watanabe