File tree Expand file tree Collapse file tree 3 files changed +5
-11
lines changed
libcxx/include/__type_traits Expand file tree Collapse file tree 3 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ inline constexpr bool is_fundamental_v = __is_fundamental(_Tp);
34
34
35
35
template <class _Tp >
36
36
struct _LIBCPP_TEMPLATE_VIS is_fundamental
37
- : public integral_constant<bool , is_void<_Tp>::value || __is_nullptr_t <_Tp>::value || is_arithmetic<_Tp>::value> {};
37
+ : public integral_constant<bool , is_void<_Tp>::value || __is_null_pointer_v <_Tp> || is_arithmetic<_Tp>::value> {};
38
38
39
39
# if _LIBCPP_STD_VER >= 17
40
40
template <class _Tp >
Original file line number Diff line number Diff line change 11
11
12
12
#include < __config>
13
13
#include < __type_traits/integral_constant.h>
14
- #include < __type_traits/remove_cv.h>
15
14
#include < cstddef>
16
15
17
16
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
21
20
_LIBCPP_BEGIN_NAMESPACE_STD
22
21
23
22
template <class _Tp >
24
- struct __is_nullptr_t_impl : public false_type {};
25
- template <>
26
- struct __is_nullptr_t_impl <nullptr_t > : public true_type {};
27
-
28
- template <class _Tp >
29
- struct _LIBCPP_TEMPLATE_VIS __is_nullptr_t : public __is_nullptr_t_impl<__remove_cv_t <_Tp> > {};
23
+ inline const bool __is_null_pointer_v = __is_same(__remove_cv(_Tp), nullptr_t );
30
24
31
25
#if _LIBCPP_STD_VER >= 14
32
26
template <class _Tp >
33
- struct _LIBCPP_TEMPLATE_VIS is_null_pointer : public __is_nullptr_t_impl< __remove_cv_t < _Tp> > {};
27
+ struct _LIBCPP_TEMPLATE_VIS is_null_pointer : integral_constant< bool , __is_null_pointer_v< _Tp>> {};
34
28
35
29
# if _LIBCPP_STD_VER >= 17
36
30
template <class _Tp >
37
- inline constexpr bool is_null_pointer_v = is_null_pointer <_Tp>::value ;
31
+ inline constexpr bool is_null_pointer_v = __is_null_pointer_v <_Tp>;
38
32
# endif
39
33
#endif // _LIBCPP_STD_VER >= 14
40
34
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ struct _LIBCPP_TEMPLATE_VIS is_scalar
49
49
bool , is_arithmetic<_Tp>::value ||
50
50
is_member_pointer<_Tp>::value ||
51
51
is_pointer<_Tp>::value ||
52
- __is_nullptr_t <_Tp>::value ||
52
+ __is_null_pointer_v <_Tp> ||
53
53
__is_block<_Tp>::value ||
54
54
is_enum<_Tp>::value> {};
55
55
// clang-format on
You can’t perform that action at this time.
0 commit comments