re PR libstdc++/56609 ([C++11] Several type traits give incorrect results for std...
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 13 Mar 2013 11:15:45 +0000 (11:15 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 13 Mar 2013 11:15:45 +0000 (11:15 +0000)
2013-03-13  Paolo Carlini  <paolo.carlini@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.

From-SVN: r196630

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/type_traits
libstdc++-v3/testsuite/20_util/is_compound/value.cc
libstdc++-v3/testsuite/20_util/is_fundamental/value.cc

index c3b4924485dc0dbb166ed19bc89863b0688c4bbd..1a77fd6baf8615738444d2bb7b60e0b18d0b358e 100644 (file)
@@ -1,3 +1,10 @@
+2013-03-13  Paolo Carlini  <paolo.carlini@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.
+
 2013-03-09  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * testsuite/20_util/function_objects/mem_fn/55463.cc: Avoid
index 62d59128f9ff3311943b1ce485b7c68fd406b19c..334b8d0ab38b890bc3a5d99f705a9beb396d48a0 100644 (file)
@@ -444,7 +444,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   /// 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 20affbf21f470cb98012f236a131c3ee04144d02..936b73666636a334c9d4a53dadecaa8d60fe1cbe 100644 (file)
@@ -46,6 +46,9 @@ void test01()
   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 da63d6042a349f0b94a28d2577668be2607c699c..00fa8822d389fbab646f199d2e1528dded448c2e 100644 (file)
@@ -46,6 +46,9 @@ void test01()
   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)) );
 }