diff --git a/format.h b/format.h index 0948bd50..7c13470d 100644 --- a/format.h +++ b/format.h @@ -120,7 +120,10 @@ void Array::append(const T *begin, const T *end) { // IntTraits is not specialized for integer types smaller than int, // since these are promoted to int. template -struct IntTraits {}; +struct IntTraits { + typedef T UnsignedType; + static bool IsNegative(T) { return false; } +}; template struct SignedIntTraits { @@ -128,24 +131,12 @@ struct SignedIntTraits { static bool IsNegative(T value) { return value < 0; } }; -template -struct UnsignedIntTraits { - typedef T UnsignedType; - static bool IsNegative(T) { return false; } -}; - template <> struct IntTraits : SignedIntTraits {}; -template <> -struct IntTraits : UnsignedIntTraits {}; - template <> struct IntTraits : SignedIntTraits {}; -template <> -struct IntTraits : UnsignedIntTraits {}; - class ArgInserter; class FormatterProxy; }