[libcxx-commits] [libcxx] [libc++] Use __is_scoped_enum for the implementation of is_scoped_enum if it's available (PR #85580)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Mar 17 12:30:09 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 662010e5398e07287242688c144bd11faaf73861 d25fa9382e0c95699051b81b43791ccf5ebd1665 -- libcxx/include/__type_traits/is_scoped_enum.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/__type_traits/is_scoped_enum.h b/libcxx/include/__type_traits/is_scoped_enum.h
index 6b5a9dba75..1db88e1335 100644
--- a/libcxx/include/__type_traits/is_scoped_enum.h
+++ b/libcxx/include/__type_traits/is_scoped_enum.h
@@ -24,7 +24,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 23
// TODO: GCC and Clang both have this builtin. Remove the false case once we've updated to GCC 14.
-#if __has_builtin(__is_scoped_enum)
+# if __has_builtin(__is_scoped_enum)
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_scoped_enum : bool_constant<__is_scoped_enum(_Tp)> {};
@@ -32,7 +32,7 @@ struct _LIBCPP_TEMPLATE_VIS is_scoped_enum : bool_constant<__is_scoped_enum(_Tp)
template <class _Tp>
inline constexpr bool is_scoped_enum_v = __is_scoped_enum(_Tp);
-#else
+# else
template <class _Tp, bool = is_enum_v<_Tp> >
struct __is_scoped_enum_helper : false_type {};
@@ -46,7 +46,7 @@ struct _LIBCPP_TEMPLATE_VIS is_scoped_enum : public __is_scoped_enum_helper<_Tp>
template <class _Tp>
inline constexpr bool is_scoped_enum_v = is_scoped_enum<_Tp>::value;
-#endif // __has_builtin(__is_scoped_enum)
+# endif // __has_builtin(__is_scoped_enum)
#endif // _LIBCPP_STD_VER >= 23
``````````
</details>
https://github.com/llvm/llvm-project/pull/85580
More information about the libcxx-commits
mailing list