POV-Ray : Newsgroups : povray.off-topic : Undirected ramblings on C++ : Re: Undirected ramblings on C++ Server Time
28 Jul 2024 18:12:10 EDT (-0400)
  Re: Undirected ramblings on C++  
From: Le Forgeron
Date: 28 Feb 2014 15:25:52
Message: <5310f0d0$1@news.povray.org>
Le 28/02/2014 20:16, Orchid Win7 v1 nous fit lire :
> 
> What I would *actually* like to do is just throw iterators around.
> However, for reasons beyond my comprehension, nobody thought to include
> an "is_at_end()" method in the standard iterators.

For a container foo (of class Foo), the iterator (forward) is at end
when == foo.end() .

If you like for(auto k: foo), you would be better inspired with for(auto
& k: foo) (otherwise k is a copy of each element of foo.

The classical for() is : for( k = foo.begin(); k!= foo.end(); ++k)


Post a reply to this message

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