General question about vectors

Miklos Vajna vmiklos at collabora.co.uk
Mon Jan 27 01:35:26 PST 2014


On Mon, Jan 27, 2014 at 11:35:22AM +1100, Chris Sherlock <chris.sherlock79 at gmail.com> wrote:
> Libreoffice takes advantage of STL vectors throughout the codebase. So just
> a general question: under what circumstances is it better to use a for loop
> than an STL for_each loop?
> 
> Are there specific advantages to for_each over a regular loop?

It's kind of a stylistic question:
http://stackoverflow.com/questions/7985687/why-use-stdfor-each-over-a-for-loop
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20140127/3746d561/attachment.pgp>


More information about the LibreOffice mailing list