diff options
author | Benjamin Kosnik <bkoz@redhat.com> | 2006-09-04 15:41:18 +0000 |
---|---|---|
committer | Benjamin Kosnik <bkoz@gcc.gnu.org> | 2006-09-04 15:41:18 +0000 |
commit | 06e744948bac604868ec7bbedf726b8d1a19b9e8 (patch) | |
tree | 7f2637fee890ffe0f197fbb576c636fd5787cce5 /libstdc++-v3/include/bits | |
parent | 88525e1bd3ae53b899101a20b59703c623f4c571 (diff) | |
download | gcc-06e744948bac604868ec7bbedf726b8d1a19b9e8.tar.gz |
re PR c++/28871 (massive C++ compile time slowdown)
2006-09-04 Benjamin Kosnik <bkoz@redhat.com>
PR c++/28871
* include/ext/bitmap_allocator.h: Add comment for end of anonymous
namespace.
* include/ext/rope: Same.
* include/bits/cpp_type_traits.h: Same.
* include/tr1/tuple: Same.
* include/tr1/functional_iterate.h: Same.
* include/bits/cpp_type_traits.h: Revert anonymous namespace
change, use nested detail instead.
* testsuite/lib/libstdc++.exp (libstdc++_init): PCHFLAGS revert to
stdc++.h.
From-SVN: r116680
Diffstat (limited to 'libstdc++-v3/include/bits')
-rw-r--r-- | libstdc++-v3/include/bits/cpp_type_traits.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/libstdc++-v3/include/bits/cpp_type_traits.h b/libstdc++-v3/include/bits/cpp_type_traits.h index f796b0ce3b8..a79c1bea634 100644 --- a/libstdc++-v3/include/bits/cpp_type_traits.h +++ b/libstdc++-v3/include/bits/cpp_type_traits.h @@ -83,6 +83,19 @@ struct __false_type { }; _GLIBCXX_BEGIN_NAMESPACE(std) +namespace detail +{ + // NB: g++ can not compile these if declared within the class + // __is_pod itself. + typedef char __one; + typedef char __two[2]; + + template<typename _Tp> + __one __test_type(int _Tp::*); + template<typename _Tp> + __two& __test_type(...); +} // namespace detail + template<bool> struct __truth_type { typedef __false_type __type; }; @@ -339,27 +352,14 @@ _GLIBCXX_BEGIN_NAMESPACE(std) : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > { }; - // NB: g++ can not compile these if declared within the class - // __is_pod itself. - namespace - { - typedef char __one; - typedef char __two[2]; - - template<typename _Tp> - __one __test_type(int _Tp::*); - - template<typename _Tp> - __two& __test_type(...); - } - // For the immediate use, the following is a good approximation. template<typename _Tp> struct __is_pod { enum { - __value = (sizeof(__test_type<_Tp>(0)) != sizeof(__one)) + __value = (sizeof(detail::__test_type<_Tp>(0)) + != sizeof(detail::__one)) }; }; |