[libcxx-commits] [libcxx] Update return type of iter_move in common_iterator and counted_iterator (PR #107535)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Sep 6 00:36:14 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: NoumanAmir-10xe (NoumanAmir657)
<details>
<summary>Changes</summary>
For the issue: #<!-- -->105303
LWG3953
---
Full diff: https://github.com/llvm/llvm-project/pull/107535.diff
2 Files Affected:
- (modified) libcxx/include/__iterator/common_iterator.h (+1-1)
- (modified) libcxx/include/__iterator/counted_iterator.h (+1-1)
``````````diff
diff --git a/libcxx/include/__iterator/common_iterator.h b/libcxx/include/__iterator/common_iterator.h
index 199de2cc7337b0..ff382f32fe8950 100644
--- a/libcxx/include/__iterator/common_iterator.h
+++ b/libcxx/include/__iterator/common_iterator.h
@@ -235,7 +235,7 @@ class common_iterator {
return std::__unchecked_get<_Sent>(__x.__hold_) - std::__unchecked_get<_I2>(__y.__hold_);
}
- _LIBCPP_HIDE_FROM_ABI friend constexpr iter_rvalue_reference_t<_Iter>
+ _LIBCPP_HIDE_FROM_ABI friend constexpr decltype(auto)
iter_move(const common_iterator& __i) noexcept(noexcept(ranges::iter_move(std::declval<const _Iter&>())))
requires input_iterator<_Iter>
{
diff --git a/libcxx/include/__iterator/counted_iterator.h b/libcxx/include/__iterator/counted_iterator.h
index ea2832e3b978dc..a02c61bf34e2f9 100644
--- a/libcxx/include/__iterator/counted_iterator.h
+++ b/libcxx/include/__iterator/counted_iterator.h
@@ -249,7 +249,7 @@ class counted_iterator
return __rhs.__count_ <=> __lhs.__count_;
}
- _LIBCPP_HIDE_FROM_ABI friend constexpr iter_rvalue_reference_t<_Iter>
+ _LIBCPP_HIDE_FROM_ABI friend constexpr decltype(auto)
iter_move(const counted_iterator& __i) noexcept(noexcept(ranges::iter_move(__i.__current_)))
requires input_iterator<_Iter>
{
``````````
</details>
https://github.com/llvm/llvm-project/pull/107535
More information about the libcxx-commits
mailing list