diff --git a/types/traits.hpp b/types/traits.hpp index 567e72ab..bd6518ed 100644 --- a/types/traits.hpp +++ b/types/traits.hpp @@ -46,11 +46,16 @@ template struct dereferenced_type> { typedef T t template struct dereferenced_type> { typedef T type; }; -template struct always_unsigned { +//----------------------------------------------------------------------------- +template +struct try_unsigned +{ typedef typename std::make_unsigned::type type; }; -template <> struct always_unsigned { typedef double type; }; -template <> struct always_unsigned { typedef float type; }; + + +template <> struct try_unsigned { typedef double type; }; +template <> struct try_unsigned { typedef float type; }; //-----------------------------------------------------------------------------