[v3] ext/type_traits.h

Paolo Carlini pcarlini@suse.de
Mon Sep 25 14:12:00 GMT 2006


Paolo Carlini wrote:

> ... but isn't __add_signed necessary anyway, from out point of view? 
> Imean, we would have,
>
> template<typename _Value>
>   struct __add_signed
>   { typedef _Value __type; };
>
> template<>
>   struct __add_signed<char>
>   { typedef signed char __type; };
>
>   ...
>
> template<typename _Value>
>   struct __remove_signed
>   { typedef _Value __type; };
>
> template<>
>   struct __remove_signed<signed char>
>   { typedef char __type; };
>
>   ...

Ah, yes, as far as __add_signed and __remove_signed are concerned, the 
ellipsis can be removed, no additional specializations are needed, 
AFAICS (well, at some point we'll get compiler support for the traits, 
then no specializations at all ;)

Paolo.



More information about the Libstdc++ mailing list