On 28 January 2010 03:42, Patrick Horgan <phorgan1@xxxxxxxxx> wrote: > me22 wrote: >> >> That works? Wouldn't it give unsigned when T is unsigned? >> > > Yeah, that's a problem! > You probably want type traits instead. In C++0x, make_signed (see meta.trans.sign in n3000), or in boost http://www.boost.org/libs/type_traits/doc/html/boost_typetraits/reference/make_signed.html