https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112641
--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> --- > which will have 𝒪(n) complexity in the case of random-access-sized but > non-common range. As mentioned in the commit message I think the ranges::next implementation is O(n) only if the range is sized with a non-sized sentinel.