[libcxx-commits] [libcxx] [libcxx] changes `__is_allocator` from a struct to a variable or concept (PR #68629)

via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 9 13:53:42 PDT 2023


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 540a1a6621b860b5d0be7e413e815be7de90722e a4b4f8e9ba365bde90d7ce83867b4756156d9ade -- libcxx/include/__type_traits/is_allocator.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libcxx/include/__type_traits/is_allocator.h b/libcxx/include/__type_traits/is_allocator.h
index b926bb6a6..9d126ec31 100644
--- a/libcxx/include/__type_traits/is_allocator.h
+++ b/libcxx/include/__type_traits/is_allocator.h
@@ -22,7 +22,7 @@
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 #if _LIBCPP_STD_VER >= 20
-template<class _Alloc>
+template <class _Alloc>
 concept __is_allocator = requires(_Alloc __a) {
   typename _Alloc::value_type;
   __a.allocate(size_t(0));
@@ -33,8 +33,8 @@ inline static const bool __is_allocator = false;
 
 template <typename _Alloc>
 inline static const bool __is_allocator<_Alloc,
-                      __void_t<typename _Alloc::value_type>,
-                      __void_t<decltype(std::declval<_Alloc&>().allocate(size_t(0)))> > = true;
+                                        __void_t<typename _Alloc::value_type>,
+                                        __void_t<decltype(std::declval<_Alloc&>().allocate(size_t(0)))> > = true;
 #endif
 
 _LIBCPP_END_NAMESPACE_STD

``````````

</details>


https://github.com/llvm/llvm-project/pull/68629


More information about the libcxx-commits mailing list