mirror of
https://github.com/darlinghq/darling-libcxx.git
synced 2025-02-24 22:00:34 +00:00
Walter Brown brought to my attention that type_traits was failing to correctly classify nullptr_t
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@127334 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
80586729e4
commit
5885da34ce
@ -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…
x
Reference in New Issue
Block a user