This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] ext/type_traits.h
On Thu, 28 Sep 2006 16:05:38 -0400, Howard Hinnant
<hhinnant@apple.com> wrote:
>On Sep 28, 2006, at 1:35 PM, Gennaro Prota wrote:
>
>> On Thu, 28 Sep 2006 12:23:51 -0400, Howard Hinnant
>> <hhinnant@apple.com> wrote:
>>
>>>> Btw., we've also had the need for signed/unsigned conversion in
>>>> our library in the past. We dealt with it by adding a typedef or
>>>> two to numeric_limits, something like this (we don't have them
>>>> anymore but at one point private versions of them were in there):
>>>>
>>>> numeric_limits<T>::signed_type
>>>> numeric_limits<T>::unsigned_type
>>>
>>> Thanks for the data point. Imho that puts us a notch closer to a
>>> proposal.
>>
>> You don't mean a proposal to add them to numeric_limits, do you?
>> (Sorry, just to be sure! :-))
>
>My personal hat on: I hope not.
>
>My LWG Chair hat on: The LWG will entertain all reasonable proposals.
My only hat on (the personal one): yes, that's fair :-). The
standalone metafunctions are more reasonable, anyway :-O
In reply to Martin, his make_type template is usually spelled
"identity<>" in the context of metaprogramming (at least that's the
name used in Boost).
Incidentally, am I the only one to find the imperative verbal forms
("add" pointer, etc.) disturbing? (For the record, in my traits
add_const is named const_qualified; the verb may seem natural when
read in isolation, but it seems to create some mental dissonance when
used together with ::type; cfr.
add_const< T >::type
to
const_qualified< T >::type
)
--
Genny.