https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111948
--- Comment #1 from 康桓瑋 <hewillk at gmail dot com> --- This is the cause: constexpr subrange(__detail::__convertible_to_non_slicing<_It> auto __i, _Sent __s, __size_type __n) noexcept(is_nothrow_constructible_v<_It, decltype(__i)> && is_nothrow_constructible_v<_Sent, _Sent&>) requires (_Kind == subrange_kind::sized) : _M_begin(std::move(__i)), _M_end(__s) { if constexpr (_S_store_size) _M_size._M_size = __n; } _M_size._M_size in the function body is already const.