[libcxx-commits] [libcxx] [libc++] Extend __default_three_way_comparator to any types that only implements operator<=> (PR #157602)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Sep 10 07:59:10 PDT 2025


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 origin/main HEAD --extensions ,cpp,h -- libcxx/test/libcxx/utilities/utility/has_default_three_way.compile.pass.cpp libcxx/include/__type_traits/desugars_to.h libcxx/include/__utility/default_three_way_comparator.h libcxx/include/__utility/lazy_synth_three_way_comparator.h libcxx/include/string
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/libcxx/include/__utility/lazy_synth_three_way_comparator.h b/libcxx/include/__utility/lazy_synth_three_way_comparator.h
index e92d6fcd5..9105d05e1 100644
--- a/libcxx/include/__utility/lazy_synth_three_way_comparator.h
+++ b/libcxx/include/__utility/lazy_synth_three_way_comparator.h
@@ -10,9 +10,9 @@
 #define _LIBCPP___UTILITY_LAZY_SYNTH_THREE_WAY_COMPARATOR_H
 
 #include <__config>
+#include <__type_traits/conjunction.h>
 #include <__type_traits/desugars_to.h>
 #include <__type_traits/enable_if.h>
-#include <__type_traits/conjunction.h>
 #include <__utility/default_three_way_comparator.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)

``````````

</details>


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


More information about the libcxx-commits mailing list