Walter Brown brought to my attention that type_traits was failing to correctly classify nullptr_t

llvm-svn: 127334
This commit is contained in:
Howard Hinnant 2011-03-09 15:10:51 +00:00
parent e503506048
commit d6c80dec76
1 changed files with 5 additions and 0 deletions

View File

@ -395,6 +395,9 @@ template <class _Tp> struct _LIBCPP_VISIBLE is_fundamental
: 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 @@ template <class _Tp> struct _LIBCPP_VISIBLE is_scalar
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