Get the signed/unsigned variant of an integer template parameter without explicit traits
The answer is in <type_traits>
For determining the signed-ness of a type use std::is_signed
and std::is_unsigned
.
For adding/removing signed-ness, there is std::make_signed
and std::make_unsigned
.
If you can't or don't want to depend on TR1/C++0x features, Boost.TypeTraits also offers you make_unsigned<>
et al.