Hi,

a couple of tiny tweaks that should reduce a bit the risk of confusions and subtle bugs (mostly suggested by Daniel, thanks!)

Thanks,
Paolo.

////////////////
2013-05-24  Paolo Carlini  <paolo.carl...@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.
Index: include/bits/cpp_type_traits.h
===================================================================
--- include/bits/cpp_type_traits.h      (revision 199306)
+++ include/bits/cpp_type_traits.h      (working copy)
@@ -327,14 +327,6 @@
     { };
 
   //
-  // 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>
Index: include/ext/type_traits.h
===================================================================
--- include/ext/type_traits.h   (revision 199306)
+++ include/ext/type_traits.h   (working copy)
@@ -155,6 +155,11 @@
     __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>

Reply via email to