[libcxx-commits] [libcxx] [libc++][C++26] P2562R1: `constexpr` Stable Sorting (PR #110320)

via libcxx-commits libcxx-commits at lists.llvm.org
Sun Oct 6 06:04:54 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 28047750d70ca12eaf29937127926ccbc39eb298 e401b3c438cdec9f5ff99f9a7986ac9f9bd9c0bb --extensions ,h,cpp -- libcxx/include/__algorithm/sort.h libcxx/include/__algorithm/stable_sort.h libcxx/include/__memory/destruct_n.h libcxx/include/algorithm libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp
``````````

</details>

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

``````````diff
diff --git a/libcxx/include/__algorithm/stable_sort.h b/libcxx/include/__algorithm/stable_sort.h
index 7ad8c36b19..8eff598f83 100644
--- a/libcxx/include/__algorithm/stable_sort.h
+++ b/libcxx/include/__algorithm/stable_sort.h
@@ -42,12 +42,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 #if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 <= 140100)
 #  define __STABLE_SORT_NEW(__placement_arg, __type, __new_initializer_func, __new_initializer_arg)                    \
     do {                                                                                                               \
-      [__placement_arg, &__new_initializer_arg] {                                                                       \
+      [__placement_arg, &__new_initializer_arg] {                                                                      \
         __STABLE_SORT_NEW_IMPL(__placement_arg, __type, __new_initializer_func, __new_initializer_arg);                \
       }();                                                                                                             \
     } while (0)
 #else
-#  define __STABLE_SORT_NEW(__placement_arg, __type, __new_initializer_func, __new_initializer_arg)                                                \
+#  define __STABLE_SORT_NEW(__placement_arg, __type, __new_initializer_func, __new_initializer_arg)                    \
     do {                                                                                                               \
       __STABLE_SORT_NEW_IMPL(__placement_arg, __type, __new_initializer_func, __new_initializer_arg);                  \
     } while (0)

``````````

</details>


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


More information about the libcxx-commits mailing list