Re: General question about vectors

2014-01-28 Thread Andrew Douglas Pitonyak
On 01/26/2014 07:35 PM, Chris Sherlock 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? I

Re: General question about vectors

2014-01-28 Thread Stephan Bergmann
On 01/27/2014 06:34 AM, Andrew Douglas Pitonyak wrote: On 01/26/2014 07:35 PM, Chris Sherlock 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

Re: General question about vectors

2014-01-27 Thread Miklos Vajna
On Mon, Jan 27, 2014 at 11:35:22AM +1100, Chris Sherlock chris.sherloc...@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

General question about vectors

2014-01-26 Thread Chris Sherlock
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? Thanks, Chris