File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
libcxx/include/__type_traits Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 22
22
_LIBCPP_BEGIN_NAMESPACE_STD
23
23
24
24
#if _LIBCPP_STD_VER >= 23
25
+
26
+ // TODO: GCC and Clang both have this builtin. Remove the false case once we've updated to GCC 14.
27
+ # if __has_builtin(__is_scoped_enum)
28
+
29
+ template <class _Tp >
30
+ struct _LIBCPP_TEMPLATE_VIS is_scoped_enum : bool_constant<__is_scoped_enum(_Tp)> {};
31
+
32
+ template <class _Tp >
33
+ inline constexpr bool is_scoped_enum_v = __is_scoped_enum(_Tp);
34
+
35
+ # else
36
+
25
37
template <class _Tp , bool = is_enum_v<_Tp> >
26
38
struct __is_scoped_enum_helper : false_type {};
27
39
@@ -33,7 +45,10 @@ struct _LIBCPP_TEMPLATE_VIS is_scoped_enum : public __is_scoped_enum_helper<_Tp>
33
45
34
46
template <class _Tp >
35
47
inline constexpr bool is_scoped_enum_v = is_scoped_enum<_Tp>::value;
36
- #endif
48
+
49
+ # endif // __has_builtin(__is_scoped_enum)
50
+
51
+ #endif // _LIBCPP_STD_VER >= 23
37
52
38
53
_LIBCPP_END_NAMESPACE_STD
39
54
You can’t perform that action at this time.
0 commit comments