[v3] traits duplicate removal

Benjamin Kosnik bkoz@redhat.com
Mon Sep 18 13:33:00 GMT 2006


This merges various duplicate traits code scattered around the library
into ext/type_traits.h. In doing so, all duplicate effort has been
eliminated, and essential traits missing from std::tr1's <type_traits>
have been found.

If we find new and useful traits, they should go in <ext/type_traits.h>.

If people want to use type_traits in their own code, I suggest using 

<tr1/type_traits>

and 

<ext/type_traits.h>

Nothing else is appropriate for user code. 

This clears the way for the eventual removal of bits/cpp_type_traits.h,
but does not remove it. Everything in that file (maybe except for
__is_char) can now be replaced at some future date by std::tr1's
<type_traits>. (hopefully soon) 

Thanks to Paolo and Peter Doerfler, who had many great suggestions. 

Also found is annoying c++/21682. This makes our hack for
std::tr1::atan2 quite fragile.

-benjamin

tested x86/linux
performance tested x86/linux
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.20060918-1.bz2
Type: application/x-bzip2
Size: 11403 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20060918/370e221d/attachment.bz2>


More information about the Libstdc++ mailing list