This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] ext/type_traits.h
- From: Peter Doerfler <gcc at pdoerfler dot com>
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Fri, 15 Sep 2006 16:19:52 +0200
- Subject: Re: [v3] ext/type_traits.h
- References: <20060915154510.d78ac3d7.bkoz@redhat.com>
> 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