File tree Expand file tree Collapse file tree 1 file changed +2
-18
lines changed
libcxx/include/__type_traits Expand file tree Collapse file tree 1 file changed +2
-18
lines changed 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/is_same.h>
15
- #include < __type_traits/remove_cv.h>
16
14
17
15
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
18
16
# pragma GCC system_header
19
17
#endif
20
18
21
19
_LIBCPP_BEGIN_NAMESPACE_STD
22
20
23
- #if __has_builtin(__is_void)
24
-
25
21
template <class _Tp >
26
- struct _LIBCPP_TEMPLATE_VIS is_void : _BoolConstant<__is_void( _Tp)> {};
22
+ struct _LIBCPP_TEMPLATE_VIS is_void : _BoolConstant<__is_same(__remove_cv( _Tp), void )> {};
27
23
28
24
# if _LIBCPP_STD_VER >= 17
29
25
template <class _Tp >
30
- inline constexpr bool is_void_v = __is_void( _Tp);
26
+ inline constexpr bool is_void_v = __is_same(__remove_cv( _Tp), void );
31
27
# endif
32
28
33
- #else
34
-
35
- template <class _Tp >
36
- struct _LIBCPP_TEMPLATE_VIS is_void : public is_same<__remove_cv_t <_Tp>, void > {};
37
-
38
- # if _LIBCPP_STD_VER >= 17
39
- template <class _Tp >
40
- inline constexpr bool is_void_v = is_void<_Tp>::value;
41
- # endif
42
-
43
- #endif // __has_builtin(__is_void)
44
-
45
29
_LIBCPP_END_NAMESPACE_STD
46
30
47
31
#endif // _LIBCPP___TYPE_TRAITS_IS_VOID_H
You can’t perform that action at this time.
0 commit comments