[libcxx-commits] [libcxx] [libc++] Implement `ranges::shift_right` (PR #177847)

via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jan 25 02:32:11 PST 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,cpp,inc, -- libcxx/include/__algorithm/ranges_shift_right.h libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.shift/assert.shift_right.pass.cpp libcxx/test/std/algorithms/alg.modifying.operations/alg.shift/ranges_shift_right.pass.cpp libcxx/include/__algorithm/shift_right.h libcxx/include/algorithm libcxx/include/version libcxx/modules/std/algorithm.inc libcxx/test/std/algorithms/ranges_robust_against_dangling.pass.cpp libcxx/test/std/algorithms/ranges_robust_against_proxy_iterators.pass.cpp libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp libcxx/test/std/library/description/conventions/customization.point.object/niebloid.compile.pass.cpp --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/modules/std/algorithm.inc b/libcxx/modules/std/algorithm.inc
index 768de4bc1..99b9e47ec 100644
--- a/libcxx/modules/std/algorithm.inc
+++ b/libcxx/modules/std/algorithm.inc
@@ -362,11 +362,11 @@ export namespace std {
 
   using std::shift_right;
 
-  #if _LIBCPP_STD_VER >= 23
+#if _LIBCPP_STD_VER >= 23
   namespace ranges {
     using std::ranges::shift_right;
   }
-  #endif // _LIBCPP_STD_VER >= 23
+#endif // _LIBCPP_STD_VER >= 23
 
   // [alg.sorting], sorting and related operations
   // [alg.sort], sorting

``````````

</details>


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


More information about the libcxx-commits mailing list