POV-Ray : Newsgroups : povray.off-topic : Standard libraries : Re: Standard libraries Server Time
6 Sep 2024 15:16:56 EDT (-0400)
  Re: Standard libraries  
From: Warp
Date: 7 Mar 2009 17:55:44
Message: <49b2fb70@news.povray.org>
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.

-- 
                                                          - Warp


Post a reply to this message

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