use of type_traits

Benjamin Kosnik bkoz@redhat.com
Wed Jan 26 20:04:00 GMT 2005


> | If that's the only objection, is there a way to configure tr1 for
> | internal library use, with uglified names (and is that too gross of a
> | solution? I believe this is possible, but may end up being too gross.) Hmmm.
> 
> If we end up with uglifying names from include/tr1/type_traits, then
> we might just keep include/bits/type_traits.h.

I was thinking that maybe include/bits/type_traits.h could be

#define _GLIBCXX_UGLY_UGLY_TRAITS
#include <tr1/type_traits>
#undef _GLIBCXX_UGLY_UGLY_TRAITS

and then tr1/type_traits could switch off this macro, to uglify stuff
with the preprocessor. Normal use of tr1/type_traits would be
unaffected. 

Too much of a pain? I'm just thinking out loud here, nothing serious.

I suppose another option is to just copy tr1/type_traits into
bits/type_traits.h and hand uglify it.

Dunno. No good options. It does seem to me that there is some value in
standardizing on type_traits. In terms of confusion vs. duplication vs.
clean code, it might be a wash. 

-benjamin



More information about the Libstdc++ mailing list