Hi,

a very simple issue, tested x86_64-linux and committed.

Thanks,
Paolo.

//////////////////////////
2013-03-13  Paolo Carlini  <paolo.carl...@oracle.com>

        PR libstdc++/56609
        * include/std/type_traits (is_fundamental): Add std::nullptr_t.
        * testsuite/20_util/is_fundamental/value.cc: Extend.
        * testsuite/20_util/is_compound/value.cc: Likewise.
Index: include/std/type_traits
===================================================================
--- include/std/type_traits     (revision 196609)
+++ include/std/type_traits     (working copy)
@@ -444,7 +444,7 @@
   /// is_fundamental
   template<typename _Tp>
     struct is_fundamental
-    : public __or_<is_arithmetic<_Tp>, is_void<_Tp>>::type
+    : public __or_<is_arithmetic<_Tp>, is_void<_Tp>, __is_nullptr_t<_Tp>>::type
     { };
 
   /// is_object
Index: testsuite/20_util/is_compound/value.cc
===================================================================
--- testsuite/20_util/is_compound/value.cc      (revision 196609)
+++ testsuite/20_util/is_compound/value.cc      (working copy)
@@ -46,6 +46,9 @@
   VERIFY( (test_category<is_compound, double>(false)) );
   VERIFY( (test_category<is_compound, long double>(false)) );
 
+  // libstdc++/56609
+  VERIFY( (test_category<is_compound, std::nullptr_t>(false)) );
+
   // Sanity check.
   VERIFY( (test_category<is_compound, ClassType>(true)) );
 }
Index: testsuite/20_util/is_fundamental/value.cc
===================================================================
--- testsuite/20_util/is_fundamental/value.cc   (revision 196609)
+++ testsuite/20_util/is_fundamental/value.cc   (working copy)
@@ -46,6 +46,9 @@
   VERIFY( (test_category<is_fundamental, double>(true)) );
   VERIFY( (test_category<is_fundamental, long double>(true)) );
 
+  // libstdc++/56609
+  VERIFY( (test_category<is_fundamental, std::nullptr_t>(true)) );
+
   // Sanity check.
   VERIFY( (test_category<is_fundamental, ClassType>(false)) );
 }

Reply via email to