diff mbox

[v3] Couple of tiny tweaks

Message ID 519FB0B5.8070303@oracle.com
State New
Headers show

Commit Message

Paolo Carlini May 24, 2013, 6:25 p.m. UTC
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.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.
diff mbox

Patch

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>