https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110512
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- I think this is the correct behaviour according to the standard. We have other bug reports about C++20 iterators used with STL algos and containers, which again, are working as required by the standard.