Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Pete Becker Newsgroups: comp.std.c++ Subject: Re: [alg.equal]: really requires a bidirectional iterator Date: Sat, 3 Sep 2011 14:36:27 -0700 (PDT) Organization: Roundhouse Consulting, Ltd. Lines: 30 Sender: std-cpp-request@vandevoorde.com Approved: stephen.clamage@oracle.com Message-ID: <2011090214140728116-pete@versatilecodingcom> References: Content-Type: text/plain; charset=utf-8; format=flowed X-Trace: news.albasani.net GxQoUPbikYxPmN0yO1GIQpSB13SccpgKwDwhCT21n6M+U0ZA9GTNxLwczFE92/a5rimjnKhzA+ZSrbnuX18FUg== NNTP-Posting-Date: Sat, 3 Sep 2011 21:36:28 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="B3tH88ylRwoOdi4CsgYG0K67FTOY4mCC8QgADVBI4XxEF4wynKjE1oef/pxcfkru+8cdhbdHSPbSPSN/zQgJ//AtS9Dh0+d/c5FJDydP08QYyemiUj8juTVt3yk2/bPX"; mail-complaints-to="abuse@albasani.net" X-Mailer: Perl5 Mail::Internet v2.05 X-Submission-Address: std-cpp-submit@vandevoorde.com Cancel-Lock: sha1:7tzZA0r8Jpv4j9DxVF6ctbBa8v4= X-Original-Date: Fri, 2 Sep 2011 14:14:07 -0400 Xref: x330-a1.tempe.blueboxinc.net comp.std.c++:270 On 2011-09-02 17:45:58 +0000, Krzysztof Żelechowski said: > The expression (*i == *(first2 + (i - first1))) does not have a meaning for > input iterators. See [alg.general]/12: In the description of the algorithms operators + and - are used for some of the iterator categories for which they do not have to be defined. In these cases the semantics of a+n is the same as that of X tmp = a; advance(tmp, n); return tmp; and that of b-a is the same as of return distance(a, b); -- Pete Roundhouse Consulting, Ltd. (www.versatilecoding.com) Author of "The Standard C++ Library Extensions: a Tutorial and Reference (www.petebecker.com/tr1book) [ comp.std.c++ is moderated. To submit articles, try posting with your ] [ newsreader. If that fails, use mailto:std-cpp-submit@vandevoorde.com ] [ --- Please see the FAQ before posting. --- ] [ FAQ: http://www.comeaucomputing.com/csc/faq.html ]