[libcxx-commits] [libcxx] [libc++] Simplify the implementation of ranges::iter_move a bit (PR #198081)

via libcxx-commits libcxx-commits at lists.llvm.org
Sat May 16 03:21:39 PDT 2026


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 h -- libcxx/include/__iterator/iter_move.h --diff_from_common_commit
``````````

: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/__iterator/iter_move.h b/libcxx/include/__iterator/iter_move.h
index 528ed600c..10d2cd660 100644
--- a/libcxx/include/__iterator/iter_move.h
+++ b/libcxx/include/__iterator/iter_move.h
@@ -57,7 +57,7 @@ struct __fn {
   // NOLINTEND(libcpp-robust-against-adl)
 
   template <class _Ip>
-    requires (!__unqualified_iter_move<_Ip> && requires(_Ip&& __t) { *__t; })
+    requires(!__unqualified_iter_move<_Ip> && requires(_Ip&& __t) { *__t; })
   [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator()(_Ip&& __i) const
       noexcept(noexcept(*std::forward<_Ip>(__i))) {
     if constexpr (is_lvalue_reference_v<decltype(*__i)>) {

``````````

</details>


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


More information about the libcxx-commits mailing list