From kde-core-devel Tue Jan 11 16:53:09 2011 From: Torsten Rahn Date: Tue, 11 Jan 2011 16:53:09 +0000 To: kde-core-devel Subject: Re: Krazy: prefix vs. postfix ++ and -- operators Message-Id: <201101111753.09611.torsten () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=129476482229092 On Tuesday, 11. January 2011 16:16:23 Christoph Feck wrote: > > Is this krazy warning still correct? > > Christoph Feck (kdepepo) Use preincrement whenever possible. Not only does this policy ensure that your code stays efficient (if the compiler isn't able to to optimize it away). It also accurately does what you mean. See the discussion box in Herb Sutter's "Exceptional C++", page 20: http://books.google.de/books?id=58rZvOSuheEC&lpg=PA20&ots=LZSfjxnWOj&dq=Herb%20Sutter%20Postincrement%20Preincrement&pg=PA21#v=onepage&q&f=false Regards, Torsten