On Thu, Feb 17, 2011 at 11:36:27PM +0100, Jan Holesovsky wrote:
The main thing that I changed was that in some cases you used
vector<...>::iterator it = another_iterator + 1; This is not correct,
operator+() is not defined on std::vector, so the result might be not
what you'd expect; similarly with -1. I have changed those to ++it, or
--it (on a temporary copy, or so).
Hi, Kendy,
sure it is defined, see ISO C++, 24.1.5, table 76: Random access
iterator requirements. ISO C++, 23.1.1, table 68 even describes
operational semantics of operator[] for vector and deque by
*(a.begin() + n) :)
D.
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.