POV-Ray : Newsgroups : povray.off-topic : Standard libraries : Re: Standard libraries Server Time
6 Sep 2024 15:18:27 EDT (-0400)
  Re: Standard libraries  
From: Nicolas Alvarez
Date: 7 Mar 2009 17:58:49
Message: <49b2fc29@news.povray.org>
Warp wrote:
> Nicolas Alvarez <nic### [at] gmailcom> wrote:
>> for (std::vector<int>::const_iterator i = someList.begin(); i !=
>> someList.end(); ++i) {
>>     total += *i;
>> }
> 
>   Maybe not the best of examples because with the next C++ standard you
> will also be able to do it like:
> 
>     for(auto i = someList.begin(); i != someList.end(); ++i)
>         total += *i;
> 
> which is not enormously longer than the lambda version.

Yes, when changing C++ code to C++0x, I'll have to decide which of the two
types of awesome to use.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.