[libcxx-commits] [libcxx] [libc++][ranges] Mark LWG3664 as resolved (PR #210550)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jul 19 09:43:28 PDT 2026
================
@@ -86,11 +86,11 @@ struct __distance {
}
template <class _Ip, sized_sentinel_for<decay_t<_Ip>> _Sp>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr iter_difference_t<_Ip> operator()(_Ip&& __first, _Sp __last) const {
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr iter_difference_t<decay_t<_Ip>> operator()(_Ip&& __first, _Sp __last) const {
if constexpr (sized_sentinel_for<_Sp, __remove_cvref_t<_Ip>>) {
return __last - __first;
} else {
- return __last - decay_t<_Ip>(__first);
+ return __last - static_cast<decay_t<_Ip>>(__first);
----------------
frederick-vs-ja wrote:
> Yes sorry. But given changes are necessary, should I fix the PR title wording?
> Do you think we should also apply LWG4242 within this scope? It seems rather small but I'm not fully sure about the implications.
Why changes were necessary? I don't think we shouldn't "fix" the PR title or implement LWG4242 together, as I think it's better to perform "pure" documentation update (and test improvement) in this PR.
https://github.com/llvm/llvm-project/pull/210550
More information about the libcxx-commits
mailing list