diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2013-05-24 18:27:59 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2013-05-24 18:27:59 +0000 |
commit | 9797bec93954fd4c7dfb48a4e26b7062fb589f90 (patch) | |
tree | 1b0c00ad5ced098dcf7b024fac3d96bec9b63598 | |
parent | 5bd93ff63e9729dbd372ebf4328eb3643e920eb5 (diff) | |
download | gcc-9797bec93954fd4c7dfb48a4e26b7062fb589f90.zip gcc-9797bec93954fd4c7dfb48a4e26b7062fb589f90.tar.gz gcc-9797bec93954fd4c7dfb48a4e26b7062fb589f90.tar.bz2 |
type_traits.h (__is_null_pointer): Add std::nullptr_t overload.
2013-05-24 Paolo Carlini <paolo.carlini@oracle.com>
* include/ext/type_traits.h (__is_null_pointer): Add std::nullptr_t
overload.
* include/bits/cpp_type_traits.h (__is_fundamental): Remove, unused.
From-SVN: r199313
-rw-r--r-- | libstdc++-v3/ChangeLog | 7 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/cpp_type_traits.h | 8 | ||||
-rw-r--r-- | libstdc++-v3/include/ext/type_traits.h | 5 |
3 files changed, 12 insertions, 8 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 7607003..43ecc7b 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2013-05-24 Paolo Carlini <paolo.carlini@oracle.com> + + * include/ext/type_traits.h (__is_null_pointer): Add std::nullptr_t + overload. + + * include/bits/cpp_type_traits.h (__is_fundamental): Remove, unused. + 2013-05-24 Jakub Jelinek <jakub@redhat.com> * src/c++11/chrono.cc: If _GLIBCXX_USE_CLOCK_GETTIME_SYSCALL, diff --git a/libstdc++-v3/include/bits/cpp_type_traits.h b/libstdc++-v3/include/bits/cpp_type_traits.h index 6c03c98..02a1859 100644 --- a/libstdc++-v3/include/bits/cpp_type_traits.h +++ b/libstdc++-v3/include/bits/cpp_type_traits.h @@ -327,14 +327,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { }; // - // A fundamental type is `void' or and arithmetic type - // - template<typename _Tp> - struct __is_fundamental - : public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> > - { }; - - // // A scalar type is an arithmetic type or a pointer type // template<typename _Tp> diff --git a/libstdc++-v3/include/ext/type_traits.h b/libstdc++-v3/include/ext/type_traits.h index 7a84034..071ebdd 100644 --- a/libstdc++-v3/include/ext/type_traits.h +++ b/libstdc++-v3/include/ext/type_traits.h @@ -155,6 +155,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __is_null_pointer(_Type) { return false; } +#if __cplusplus >= 201103L + inline bool + __is_null_pointer(std::nullptr_t) + { return true; } +#endif // For complex and cmath template<typename _Tp, bool = std::__is_integer<_Tp>::__value> |