------- Comment #29 from paolo dot carlini at oracle dot com 2010-01-27 15:31 ------- To be clear: when the tr1_impl/type_traits implementation code is included as tr1 code, is included from <tr1/type_traits> that is, _GLIBCXX_INCLUDE_AS_CXX0X is undefined and no error should happen. Likewise, when the tr1_impl/type_traits code is included as C++0x code, from <type_traits> that is, the macro is defined, but no problem should occur in that case too because char16_t and char32_t are certainly available in C++0x mode.
In practice, on linux I can compile the provided one-line snippet, both with -std=c++0x and without, and get *only* the errors unrelated to char16_t / char32_t. This doesn't suprise me, because in the libstdc++ testsuite we are *very* careful about these things: we have tons of testcases including <type_traits> and <tr1/type_traits> in normal mode, c++0x mode, etc. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42880