forked from OSchip/llvm-project
Walter Brown brought to my attention that type_traits was failing to correctly classify nullptr_t
llvm-svn: 127334
This commit is contained in:
parent
e503506048
commit
d6c80dec76
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue