https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65861
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> --- There are actually good reasons *not* to reject input iterators at compile-time. You could have an iterator which meets most, but not all, the forward iterator requirements, and so must have input_iterator_tag as its category. Such as iterator could work fine with std::search, if we don't reject it via a static assertion. (istreambuf_iterator is not such an iterator, as it's genuinely a single-pass iterator, and so can't be used ... but we can't reliably detect that as the only property we can test is the iterator_category tag).