https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107871
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- This isn't valid code, you can't use max diff type for your own types. It can only be used by the library for iota_view, but that doesn't have output iterators.