Boost logo

Boost Users :

Subject: [Boost-users] dubious range mismatch prerequisite
From: Krzysztof Żelechowski (giecrilj_at_[hidden])
Date: 2011-09-01 17:22:27


The documentation for mismatch, as applied to ranges, says that rng2 must be
at least as long as rng1. Why is this precondition necessary? The
precondition is impossible to evaluate for bare input iterators without
destroying the iterators, whereupon it is impossible to call mismatch any
more.

IMHO, it would be perfectly reasonable to stop at the end of rng2 if rng2 is
shorter.

<URL: http://www.boost.org/doc/libs/1_47_0/libs/range/
doc/html/range/reference/algorithms/non_mutating/mismatch.html >


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net