https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69287
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to David Binderman from comment #0) > __glibcxx_assert(__first == __last || !(*__first < *__last)); It wouldn't make much sense to assert that the inputs to a generic sort algorithm are not already sorted, would it :)