[Libreoffice] [PUSHED] Re: [PATCH] DECLARE_LIST(TOXControlList, Control*) to std::vector<Control*> in sw.
David Tardon
dtardon at redhat.com
Fri Feb 18 00:11:12 PST 2011
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.
More information about the LibreOffice
mailing list