Fix tests on MSVC, take 2.

This commit is contained in:
Victor Zverovich
2014-07-31 07:43:14 -07:00
parent 3f444fe3e2
commit d81fafc295
3 changed files with 58 additions and 18 deletions
+12
View File
@@ -420,6 +420,18 @@ struct IntTraits {
TypeSelector<std::numeric_limits<T>::digits <= 32>::Type MainType;
};
// MakeUnsigned<T>::Type gives an unsigned type corresponding to integer type T.
template <typename T>
struct MakeUnsigned { typedef T Type; };
#define SPECIALIZE_MAKE_UNSIGNED(T) \
template <> \
struct MakeUnsigned<signed T> { typedef unsigned T Type; }
SPECIALIZE_MAKE_UNSIGNED(char);
SPECIALIZE_MAKE_UNSIGNED(short);
SPECIALIZE_MAKE_UNSIGNED(long);
template <typename T>
struct IsLongDouble { enum {VALUE = 0}; };