[libcxx-commits] [libcxx] [libc++] Marks a variable const. (PR #88562)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Apr 12 11:58:44 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Mark de Wever (mordante)
<details>
<summary>Changes</summary>
This removes a TODO from the code base.
---
Full diff: https://github.com/llvm/llvm-project/pull/88562.diff
1 Files Affected:
- (modified) libcxx/include/__algorithm/sort.h (+2-3)
``````````diff
diff --git a/libcxx/include/__algorithm/sort.h b/libcxx/include/__algorithm/sort.h
index 8a5e0211cdf4c1..07b5814639e9e4 100644
--- a/libcxx/include/__algorithm/sort.h
+++ b/libcxx/include/__algorithm/sort.h
@@ -696,9 +696,8 @@ __partition_with_equals_on_left(_RandomAccessIterator __first, _RandomAccessIter
using _Ops = _IterOps<_AlgPolicy>;
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
typedef typename std::iterator_traits<_RandomAccessIterator>::value_type value_type;
- // TODO(LLVM18): Make __begin const, see https://reviews.llvm.org/D147089#4349748
- _RandomAccessIterator __begin = __first; // used for bounds checking, those are not moved around
- const _RandomAccessIterator __end = __last;
+ const _RandomAccessIterator __begin = __first; // used for bounds checking, those are not moved around
+ const _RandomAccessIterator __end = __last;
(void)__end; //
value_type __pivot(_Ops::__iter_move(__first));
if (__comp(__pivot, *(__last - difference_type(1)))) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/88562
More information about the libcxx-commits
mailing list