--- a/aten/src/ATen/core/List_inl.h	2026-06-02 11:23:07.004899341 +0200
+++ b/aten/src/ATen/core/List_inl.h	2026-06-02 11:23:07.007296488 +0200
@@ -198,7 +198,7 @@
 template<class T>
 typename List<T>::internal_reference_type List<T>::operator[](size_type pos) {
   static_cast<void>(impl_->list.at(pos)); // Throw the exception if it is out of range.
-  return {impl_->list.begin() + static_cast<typename decltype(impl_->list)::difference_type>(pos)};
+  return {impl_->list.begin() + static_cast<std::ptrdiff_t>(pos)};
 }
 
 template<class T>
