Thu Sep 28 17:31:00 GMT 2006
On Thu, 28 Sep 2006 16:14:34 +0200, Benjamin Kosnik <firstname.lastname@example.org>
>> In the use cases I've personally been involved with, I had an
>> integral type T which could be either signed or unsigned, and I
>> needed to get its unsigned counterpart (or signed counterpart).
>> Actually the former (unsigned counterpart) was my more common need.
>> Having to spell that typename __add_unsigned<typename
>> __remove_signed<T>::type>::type seems cumbersome.
>All this seems unduly complicated to me.
>TR1 already has...
Let me also add, as a general remark, that looking at what got into
TR1 or into the working paper is often a double-edged weapon: while it
may well open our designer eyes on a cleaner world it sometimes just
shows what has been in boost for years without a thorough review. With
no offense intended either for boost developers and the library
working group, it happens (more often than we all would like to) that
some areas of libraries accepted in boost, mostly included for
orthogonality reasons, are close to unexplored. So, it is a *good
thing* that we put the facilities already accepted into WP/TR1 under
(What I mostly do is forgetting about the already existing type traits
and sketch what I really need. Then, if these happen to be facilities
already existing in TR1 then I use those ones; otherwise I carefully
compare the two solutions to see which one is better. In any case,
it's unbelievable how many details one notices this way that escape
any reasonably careful review :-))
More information about the Libstdc++