[libcxx-commits] [libcxx] [libcxx] applies integer-like changes from [P2393R1] (PR #74161)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jul 13 09:39:29 PDT 2025


================
@@ -38,12 +38,13 @@ namespace ranges::views {
 namespace __counted {
 
   struct __fn {
-    template<contiguous_iterator _It>
-    _LIBCPP_HIDE_FROM_ABI
-    static constexpr auto __go(_It __it, iter_difference_t<_It> __count)
-      noexcept(noexcept(span(std::to_address(__it), static_cast<size_t>(__count))))
-      // Deliberately omit return-type SFINAE, because to_address is not SFINAE-friendly
-      { return          span(std::to_address(__it), static_cast<size_t>(__count)); }
+    template <contiguous_iterator _It>
+    _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_It __it, iter_difference_t<_It> __count) noexcept(
+        noexcept(span(std::to_address(__it), static_cast<size_t>(static_cast<iter_difference_t<_It>>(__count)))))
+    // Deliberately omit return-type SFINAE, because to_address is not SFINAE-friendly
+    {
+      return span(std::to_address(__it), static_cast<size_t>(static_cast<iter_difference_t<_It>>(__count)));
----------------
frederick-vs-ja wrote:

So the changes in `__counted::__fn` are probably redundant, at all.

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


More information about the libcxx-commits mailing list