[v3] ext/type_traits.h
Peter Doerfler
gcc@pdoerfler.com
Fri Sep 15 14:20:00 GMT 2006
> Index: include/tr1/random.tcc
> ===================================================================
> --- include/tr1/random.tcc (revision 116965)
> +++ include/tr1/random.tcc (working copy)
> @@ -88,34 +88,26 @@
> };
>
> template<typename _ValueT>
> - struct _To_Unsigned_Type
> + struct _To_unsigned_type
> { typedef _ValueT _Type; };
>
> template<>
> - struct _To_Unsigned_Type<short>
> + struct _To_unsigned_type<short>
> { typedef unsigned short _Type; };
>
> template<>
> - struct _To_Unsigned_Type<int>
> + struct _To_unsigned_type<int>
> { typedef unsigned int _Type; };
>
> template<>
> - struct _To_Unsigned_Type<long>
> + struct _To_unsigned_type<long>
> { typedef unsigned long _Type; };
>
> #ifdef _GLIBCXX_USE_LONG_LONG
> template<>
> - struct _To_Unsigned_Type<long long>
> + struct _To_unsigned_type<long long>
> { typedef unsigned long long _Type; };
> #endif
I think it makes sense to move these out as well. Even if they are only
used in random ATM that seems to be a general concept that could be
useful elsewhere. Following the lead of tr1::type_traits the name
"add_unsigned" might be better, and the corresponding "remove_unsigned"
could be added as well.
Maybe this is even another candidate for Howard's list?
Thanks, Peter
More information about the Libstdc++
mailing list