diff options
author | Benjamin Kosnik <bkoz@wells.artheist.org> | 2006-07-28 04:57:34 +0000 |
---|---|---|
committer | Benjamin Kosnik <bkoz@wells.artheist.org> | 2006-07-28 04:57:34 +0000 |
commit | c4f9477c266057fce740a788fb61d3b8a878270c (patch) | |
tree | 81547eb1eadbf4669dec412581227155f1ad5c83 /libstdc++-v3/include/bits/cpp_type_traits.h | |
parent | 780aacc58a2b61b5a1df6e89f03e8b95d8e3cb31 (diff) |
2006-07-27 Benjamin Kosnik <bkoz@wells.artheist.org>
PR libstdc++/19664 round 3
* include/Makefile.am (tr1_headers): Add hashtable_policy.h.
* include/Makefile.in: Regenerate.
* include/tr1/hashtable: Move policy classes into...
* include/tr1/hashtable_policy.h: ... this. New.
* src/globals_locale.cc: Move contents....
* src/locale_init.cc: ... to here, put in anonymous namespace.
* src/Makefile.am: Remove globals_locale.cc.
* src/Makefile.in: Regenerate.
* src/locale.cc: Convert __gnu_internal to anonymous namespace.
* src/debug.cc: Same.
* src/ext-inst.cc: Same.
* src/mt_allocator.cc: Same.
* src/pool_allocator.cc: Same.
* include/tr1/random: Convert std::tr1::_Private to anonymous
namespace.
* include/tr1/random.tcc: Same.
* include/tr1/hashtable: Move ::Internal to std::tr1::detail and
enclose bits that can actually be internal in in anonymous
namespace.
* include/tr1/unordered_set: Adjust explicit qualifications for
namespace changes.
* include/tr1/unordered_map: Same.
* include/tr1/cmath: Convert __gnu_internal to nested detail namespace.
* include/bits/cpp_type_traits.h: Move __type_type into anonymous
namespace.
* include/ext/rope: Change _Rope_constants to anonymous namespace.
* include/ext/ropeimpl.h: Same.
* src/ext-inst.cc: Same.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@115790 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits/cpp_type_traits.h')
-rw-r--r-- | libstdc++-v3/include/bits/cpp_type_traits.h | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/libstdc++-v3/include/bits/cpp_type_traits.h b/libstdc++-v3/include/bits/cpp_type_traits.h index 53823a81450..f796b0ce3b8 100644 --- a/libstdc++-v3/include/bits/cpp_type_traits.h +++ b/libstdc++-v3/include/bits/cpp_type_traits.h @@ -70,19 +70,6 @@ // removed. // -// NB: g++ can not compile these if declared within the class -// __is_pod itself. -namespace __gnu_internal -{ - typedef char __one; - typedef char __two[2]; - - template<typename _Tp> - __one __test_type(int _Tp::*); - template<typename _Tp> - __two& __test_type(...); -} // namespace __gnu_internal - // Forward declaration hack, should really include this from somewhere. _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) @@ -352,16 +339,27 @@ _GLIBCXX_BEGIN_NAMESPACE(std) : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > { }; - // - // For the immediate use, the following is a good approximation - // + // 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(__gnu_internal::__test_type<_Tp>(0)) - != sizeof(__gnu_internal::__one)) + __value = (sizeof(__test_type<_Tp>(0)) != sizeof(__one)) }; }; |