[cfe-commits] [libcxx] r127334 - /libcxx/trunk/include/type_traits

Howard Hinnant hhinnant at apple.com
Wed Mar 9 07:10:51 PST 2011


Author: hhinnant
Date: Wed Mar  9 09:10:51 2011
New Revision: 127334

URL: http://llvm.org/viewvc/llvm-project?rev=127334&view=rev
Log:
Walter Brown brought to my attention that type_traits was failing to correctly classify nullptr_t

Modified:
    libcxx/trunk/include/type_traits

Modified: libcxx/trunk/include/type_traits
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/type_traits?rev=127334&r1=127333&r2=127334&view=diff
==============================================================================
--- libcxx/trunk/include/type_traits (original)
+++ libcxx/trunk/include/type_traits Wed Mar  9 09:10:51 2011
@@ -395,6 +395,9 @@
     : public integral_constant<bool, is_void<_Tp>::value      ||
                                      is_arithmetic<_Tp>::value> {};
 
+template <> struct _LIBCPP_VISIBLE is_fundamental<nullptr_t>
+    : public true_type {};
+
 // is_scalar
 
 template <class _Tp> struct _LIBCPP_VISIBLE is_scalar
@@ -403,6 +406,8 @@
                                      is_pointer<_Tp>::value        ||
                                      is_enum<_Tp>::value           > {};
 
+template <> struct _LIBCPP_VISIBLE is_scalar<nullptr_t> : public true_type {};
+
 // is_object
 
 template <class _Tp> struct _LIBCPP_VISIBLE is_object





More information about the cfe-commits mailing list