https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112490
--- Comment #8 from Chameleon <gessos.paul at yahoo dot gr> --- No, it is partially fixed. Please patch also this: template<__detail::__not_a_const_iterator _Sent, same_as<basic_const_iterator> _Self> requires sized_sentinel_for<_Sent, _It> friend constexpr difference_type operator-(const _Sent& __x, const _Self& __y) noexcept(noexcept(__x - __y._M_current)) { return __x - __y._M_current; } Actually, intercept every case of __not_a_const_iterator and apply what you already applied.