https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65861
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- This is user error, std::search() requires forward iterators and the library is not required to diagnose it. Defining _GLIBCXX_CONCEPT_CHECKS causes it to be rejected.