https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110075
--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> --- It's hard to decide. It seems that once we've covered std::span-like classes, in practice the warning points out real issues. I would hope that code like you posted is actually fairly rare. But it's difficult to be sure.