https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115444
--- Comment #2 from Jiang An <de34 at live dot cn> --- Oh, UB seems still introduced by [iterator.requirements.general]/12 (https://eel.is/c++draft/iterator.requirements.general#12). > The result of the application of library functions to invalid ranges is > undefined. Although this rule seems defective as it seemingly makes std::unreachable_sentinel almost unusable.