
David Abrahams ha escrito:
on Fri Nov 09 2007, "JOAQUIN LOPEZ MU?Z" <joaquin-AT-tid.es> wrote:
I'm afraid (last<first) violates the precondition even with random access iterators, according to 24.1.6 and as explicitly acknowledged at http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#204 .
I don't see how to read the issue resolution so it says that.
The resolution states that the definition of "reachable" to be taken into account is the one given in 24.1/6, which depends only on operator ++. "An iterator j is called reachable from an iterator i if and only if there is a finite sequence of applications of the expression ++i that makes i == j" Hence if last<first, last is *not* reachable from first; there is no finite sequence of applications of operator++() to first that gives you last. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo